Exemplo n.º 1
0
 def test_quiet_and_verbose(self):
     """
     Fail if both -q and -v are passed.
     """
     with pytest.raises(ValueError) as e:
         main.create_log_config(verbose=True, quiet=True)
     assert "makes no sense" in e.value.args[0]
Exemplo n.º 2
0
 def test_quiet_and_verbose(self):
     """
     Fail if both -q and -v are passed.
     """
     with pytest.raises(ValueError) as e:
         main.create_log_config(verbose=True, quiet=True)
     assert "makes no sense" in e.value.args[0]
Exemplo n.º 3
0
 def test_logging(self, verbose, quiet, expected):
     """
     Ensure verbosity options cause the correct log level.
     """
     level = main.create_log_config(verbose,
                                    quiet)["loggers"]["doc2dash"]["level"]
     assert level is expected
Exemplo n.º 4
0
 def test_logging(self, verbose, quiet, expected):
     """
     Ensure verbosity options cause the correct log level.
     """
     level = main.create_log_config(
         verbose, quiet
     )["loggers"]["doc2dash"]["level"]
     assert level is expected