Esempio n. 1
0
 def test_import_name_unary(self):
     impname = pysupport.import_name("rudiments.pysupport:import_name")
     assert impname is pysupport.import_name
Esempio n. 2
0
 def test_import_name_unary_failure(self):
     with pytest.raises(ValueError):
         pysupport.import_name("rudiments.pysupport")
Esempio n. 3
0
 def test_import_name_failure(self):
     with pytest.raises(AttributeError):
         pysupport.import_name("rudiments.pysupport", "foo_bar_baz")
     with pytest.raises(ImportError):
         pysupport.import_name("foo.bar.baz", "import_name")