/usr/lib/python3/dist-packages/mdp/test/test_config.py is in python3-mdp 3.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | """Test the configuration object."""
from builtins import object
from mdp import config
class TestConfig(object):
def teardown_method(self, method):
delattr(config, 'has_test_property')
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
def test_config_depfound_string(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
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
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
|