示例#1
0
 def test_import_name_unary(self):
     impname = pysupport.import_name("rudiments.pysupport:import_name")
     assert impname is pysupport.import_name
示例#2
0
 def test_import_name_unary_failure(self):
     with pytest.raises(ValueError):
         pysupport.import_name("rudiments.pysupport")
示例#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")