Loading tests/core/test_generate.py +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ def test_generate_single_error(dotsbws_error_result, caplog, parser): sbws.core.generate.main(args, conf) dd = conf['paths']['datadir'] for record in caplog.records: if 'Read 0 lines from {}'.format(dd) in record.getMessage(): if 'Keeping 0/1 read lines from {}'.format(dd) in record.getMessage(): break else: assert None, 'Unable to find log line indicating 0 success results '\ Loading tests/core/test_stats.py +4 −4 Original line number Diff line number Diff line Loading @@ -131,9 +131,9 @@ def test_stats_fresh_result(tmpdir, capsys, caplog): assert needed_line in lines lines = [l.getMessage() for l in caplog.records] needed_log_lines = [ 'Read 1 lines from {}/{}/{}.txt'.format( 'Keeping 1/1 read lines from {}/{}/{}.txt'.format( tmpdir, 'datadir', datetime.utcfromtimestamp(time.time()).date()), 'Keeping 1/1 results', 'Keeping 1/1 results after removing old ones', ] for needed_line in needed_log_lines: assert needed_line in lines Loading Loading @@ -167,9 +167,9 @@ def test_stats_fresh_results(time_mock, tmpdir, capsys, caplog): assert needed_line in lines lines = [l.getMessage() for l in caplog.records] needed_log_lines = [ 'Read 2 lines from {}/{}/{}.txt'.format( 'Keeping 2/2 read lines from {}/{}/{}.txt'.format( tmpdir, 'datadir', datetime.utcfromtimestamp(time.time()).date()), 'Keeping 2/2 results', 'Keeping 2/2 results after removing old ones', 'Found a _ResultType.Error for the first time', 'Found a _ResultType.Success for the first time', ] Loading Loading
tests/core/test_generate.py +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ def test_generate_single_error(dotsbws_error_result, caplog, parser): sbws.core.generate.main(args, conf) dd = conf['paths']['datadir'] for record in caplog.records: if 'Read 0 lines from {}'.format(dd) in record.getMessage(): if 'Keeping 0/1 read lines from {}'.format(dd) in record.getMessage(): break else: assert None, 'Unable to find log line indicating 0 success results '\ Loading
tests/core/test_stats.py +4 −4 Original line number Diff line number Diff line Loading @@ -131,9 +131,9 @@ def test_stats_fresh_result(tmpdir, capsys, caplog): assert needed_line in lines lines = [l.getMessage() for l in caplog.records] needed_log_lines = [ 'Read 1 lines from {}/{}/{}.txt'.format( 'Keeping 1/1 read lines from {}/{}/{}.txt'.format( tmpdir, 'datadir', datetime.utcfromtimestamp(time.time()).date()), 'Keeping 1/1 results', 'Keeping 1/1 results after removing old ones', ] for needed_line in needed_log_lines: assert needed_line in lines Loading Loading @@ -167,9 +167,9 @@ def test_stats_fresh_results(time_mock, tmpdir, capsys, caplog): assert needed_line in lines lines = [l.getMessage() for l in caplog.records] needed_log_lines = [ 'Read 2 lines from {}/{}/{}.txt'.format( 'Keeping 2/2 read lines from {}/{}/{}.txt'.format( tmpdir, 'datadir', datetime.utcfromtimestamp(time.time()).date()), 'Keeping 2/2 results', 'Keeping 2/2 results after removing old ones', 'Found a _ResultType.Error for the first time', 'Found a _ResultType.Success for the first time', ] Loading