Пример #1
0
 def test_wrong_type(self):
     """
     Passing anything else than a boolean raises TypeError.
     """
     with pytest.raises(TypeError) as e:
         _config.set_run_validators("False")
     assert "'run' must be bool." == e.value.args[0]
Пример #2
0
 def test_wrong_type(self):
     """
     Passing anything else than a boolean raises TypeError.
     """
     with pytest.raises(TypeError) as e:
         _config.set_run_validators("False")
     assert "'run' must be bool." == e.value.args[0]
Пример #3
0
 def test_set_run_validators(self):
     """
     Sets `_run_validators`.
     """
     _config.set_run_validators(False)
     assert False is _config._run_validators
     _config.set_run_validators(True)
     assert True is _config._run_validators
Пример #4
0
 def test_set_run_validators(self):
     """
     Sets `_run_validators`.
     """
     _config.set_run_validators(False)
     assert False is _config._run_validators
     _config.set_run_validators(True)
     assert True is _config._run_validators