From: <mk...@us...> - 2003-10-21 05:30:15
|
Update of /cvsroot/csp/APPLICATIONS/SimData/SimData/Tests In directory sc8-pr-cvs1:/tmp/cvs-serv7361/Tests Modified Files: __init__.py Added Files: TypeTests.py Log Message: --- NEW FILE: TypeTests.py --- import SimData import os from unittest import TestCase, TestSuite, makeSuite def round8(x): return long((x*1e+8)+0.5)*1e-8; def round5(x): return long((x*1e+5)+0.5)*1e-5; class KeyTest(TestCase): """Test functionality Key""" def setUp(self): pass def testComparisons(self): """Test Key comparisons""" key_foo = SimData.Key("Foo") key_bar = SimData.Key("Bar") self.assertEqual(key_foo, SimData.Key("Foo")) self.assertEqual(key_foo, "Foo") self.assertNotEqual(key_foo, key_bar) self.assertNotEqual(key_foo, "Bar") def testRepr(self): """Test string and type representations""" key_foo = SimData.Key("Foo") self.assertEqual(str(key_foo)[:6], "Key<0x") self.assertEqual(key_foo.typeString(), "type::Key") KeySuite = makeSuite(KeyTest, 'test') suites = [KeySuite] Index: __init__.py =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/SimData/Tests/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 19 Oct 2003 23:53:56 -0000 1.2 --- __init__.py 21 Oct 2003 04:34:04 -0000 1.3 *************** *** 8,11 **** --- 8,12 ---- addTestSuites("ArchiveTests") + addTestSuites("TypeTests") runner = unittest.TextTestRunner() |