[Python-checkins] python/dist/src/Lib/test test_decimal.py, 1.10, 1.11

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Aug 8 22:17:48 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12132

Modified Files:
	test_decimal.py 
Log Message:
Add a test for Context.copy().

Index: test_decimal.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_decimal.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_decimal.py	14 Jul 2004 16:35:30 -0000	1.10
--- test_decimal.py	8 Aug 2004 20:17:45 -0000	1.11
***************
*** 1057,1060 ****
--- 1057,1068 ----
          self.assert_(Decimal(10) not in ['a', 1.0, (1,2), {}])
  
+     def test_copy(self):
+         # All copies should be deep
+         c = Context()
+         d = c.copy()
+         self.assertNotEqual(id(c), id(d))
+         self.assertNotEqual(id(c.flags), id(d.flags))
+         self.assertNotEqual(id(c.traps), id(d.traps))
+ 
  def test_main(arith=False, verbose=None):
      """ Execute the tests.



More information about the Python-checkins mailing list