def test_ClrAddReference(self): from clr import AddReference from System.IO import FileNotFoundException for name in ("System", "Python.Runtime"): asm = AddReference(name) self.assertEqual(asm.GetName().Name, name) self.failUnlessRaises(FileNotFoundException, AddReference, "somethingtotallysilly")
def test_clr_add_reference(): from clr import AddReference from System.IO import FileNotFoundException for name in ("System", "Python.Runtime"): assy = AddReference(name) assy_name = assy.GetName().Name assert assy_name == name with pytest.raises(FileNotFoundException): AddReference("somethingtotallysilly")