def test_tmpnam(): str = nt.tmpnam() AreEqual(isinstance(str,type("string")),True) if is_cli: Assert(str.find(colon)!=-1, "1,the returned path is invalid") Assert(str.find(separator)!=-1, "2,the returned path is invalid")
def test_tmpnam(self): str = nt.tmpnam() self.assertEqual(isinstance(str, type("string")), True) if is_cli: self.assertTrue( str.find(':') != -1, "1,the returned path is invalid") self.assertTrue( str.find(os.sep) != -1, "2,the returned path is invalid")
def test_tmpnam(self): str = nt.tmpnam() self.assertEqual(isinstance(str,type("string")),True) if is_cli: self.assertTrue(str.find(':')!=-1, "1,the returned path is invalid") self.assertTrue(str.find(os.sep)!=-1, "2,the returned path is invalid")