diff --git a/tests/test_cliutil.py b/tests/test_cliutil.py index 19dc17010d4d3b59bf7f4dc83449b72fee0e2a94..8623461e99dd233870451202adf2c26a1f8f4aec 100644 --- a/tests/test_cliutil.py +++ b/tests/test_cliutil.py @@ -33,11 +33,6 @@ from conservancy_beancount import cliutil FILE_NAMES = ['-foobar', '-foo.bin'] STREAM_PATHS = [None, Path('-')] -class AlwaysEqual: - def __eq__(self, other): - return True - - class MockTraceback: def __init__(self, stack=None, index=0): if stack is None: @@ -141,13 +136,6 @@ def test_excepthook_traceback(caplog): assert caplog.records assert caplog.records[-1].message == ''.join(traceback.format_exception(*args)) -@pytest.mark.parametrize('prog_name,expected', [ - ('', False), - (AlwaysEqual(), True), -]) -def test_is_main_script(prog_name, expected): - assert cliutil.is_main_script(prog_name) == expected - @pytest.mark.parametrize('arg,expected', [ ('debug', logging.DEBUG), ('info', logging.INFO), @@ -166,11 +154,10 @@ def test_loglevel_argument(argparser, arg, expected): def test_setup_logger(): stream = io.StringIO() logger = cliutil.setup_logger( - 'test_cliutil', logging.INFO, stream, '%(name)s %(levelname)s: %(message)s', + 'test_cliutil', stream, '%(name)s %(levelname)s: %(message)s', ) - logger.debug("test debug") - logger.info("test info") - assert stream.getvalue() == "test_cliutil INFO: test info\n" + logger.critical("test crit") + assert stream.getvalue() == "test_cliutil CRITICAL: test crit\n" @pytest.mark.parametrize('arg', [ '--license',