Exemple #1
0
 def testImportModule(self):
     """Test module import."""
     m = PythonEngine.ImportModule("sys")
     n = m.GetAttr("__name__")
     self.failUnless(n.AsManagedObject(System.String) == "sys")
Exemple #2
0
def test_import_module():
    """Test module import."""
    m = PythonEngine.ImportModule("sys")
    n = m.GetAttr("__name__")
    assert n.AsManagedObject(System.String) == "sys"