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