Exemple #1
0
 def test_check_fit_mode(self, func, cmd, argv, config):
     from palladium.util import resolve_dotted_name
     with patch(func):
         cmd = resolve_dotted_name(cmd)
         assert config.initialized is False
         cmd(argv=argv)
         assert config.initialized is True
         assert config == {'__mode__': 'fit'}
Exemple #2
0
 def test_module(self, resolve_dotted_name):
     resolve_dotted_name('threading') is threading
Exemple #3
0
 def test_with_dots(self, resolve_dotted_name):
     dotted = 'palladium.tests.test_util.TestResolveDottedName'
     assert (resolve_dotted_name(dotted) is
             TestResolveDottedName)
Exemple #4
0
 def test_with_colon(self, resolve_dotted_name):
     dotted = 'palladium.tests.test_util:TestResolveDottedName.test_with_colon'
     assert (resolve_dotted_name(dotted) is
             TestResolveDottedName.test_with_colon)
Exemple #5
0
 def test_with_dots(self, resolve_dotted_name):
     dotted = 'palladium.tests.test_util.TestResolveDottedName'
     assert (resolve_dotted_name(dotted) is
             TestResolveDottedName)
Exemple #6
0
 def test_with_colon(self, resolve_dotted_name):
     dotted = 'palladium.tests.test_util:TestResolveDottedName.test_with_colon'
     assert (resolve_dotted_name(dotted) is
             TestResolveDottedName.test_with_colon)