示例#1
0
 def test_config_depfound(self):
     s = config.ExternalDepFound('test_property', 0.777)
     assert bool(s) == True
     assert config.has_test_property
     info = config.info()
     assert 'test property' in info
     assert '0.777' in info
示例#2
0
 def test_config_depfailed_string(self):
     s = config.ExternalDepFailed('test_property', 'GOOGOO')
     assert bool(s) == False
     assert not config.has_test_property
     info = config.info()
     assert 'test property' in info
     assert 'GOOGOO' in info
示例#3
0
 def test_config_depfailed_exc(self):
     s = config.ExternalDepFailed('test_property', ImportError('GOOGOO'))
     assert bool(s) == False
     assert not config.has_test_property
     info = config.info()
     assert 'test property' in info
     assert 'GOOGOO' in info
示例#4
0
 def test_config_depfound(self):
     s = config.ExternalDepFound('test_property', 0.777)
     assert bool(s) == True
     assert config.has_test_property
     info = config.info()
     assert 'test property' in info
     assert '0.777' in info
示例#5
0
 def test_config_depfailed_string(self):
     s = config.ExternalDepFailed('test_property', 'GOOGOO')
     assert bool(s) == False
     assert not config.has_test_property
     info = config.info()
     assert 'test property' in info
     assert 'GOOGOO' in info
示例#6
0
 def test_config_depfailed_exc(self):
     s = config.ExternalDepFailed('test_property', ImportError('GOOGOO'))
     assert bool(s) == False
     assert not config.has_test_property
     info = config.info()
     assert 'test property' in info
     assert 'GOOGOO' in info