Skip to content

Commit

Permalink
Merge pull request astrohr#2 from frnhr/patrik_develop
Browse files Browse the repository at this point in the history
piar fora piar
  • Loading branch information
pkukic authored Apr 24, 2019
2 parents 2e5a639 + 34488f5 commit 31d7e44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions void/tests/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_sigint(self, p_sys, p_log, *_):
def test_empty_line(self, p_sys, p_writer_cls, *_):
p_sys.stdin = ['line 1', '', 'line 3']
main()
writer = p_writer_cls.return_value
writer = p_writer_cls.return_value.__enter__.return_value
expected = [mock.call('line 1'), mock.call('line 3')]
self.assertEqual(expected, writer.insert_data.call_args_list)

Expand All @@ -138,7 +138,7 @@ def test_empty_line(self, p_sys, p_writer_cls, *_):
@mock.patch('void.writer.sys')
def test_catch_exc(self, p_sys, p_log, p_writer_cls, *_):
p_sys.stdin = ['line 1']
writer = p_writer_cls.return_value
writer = p_writer_cls.return_value.__enter__.return_value
writer.insert_data.side_effect = ValueError('foo')
main()
p_log.warning.assert_called_once_with('foo', exc_info=True)

0 comments on commit 31d7e44

Please sign in to comment.