[Python-checkins] r75417 - python/trunk/Lib/test/test_profilehooks.py

antoine.pitrou python-checkins at python.org
Wed Oct 14 20:47:14 CEST 2009


Author: antoine.pitrou
Date: Wed Oct 14 20:47:13 2009
New Revision: 75417

Log:
Fix failures in test_profilehooks when run with -3



Modified:
   python/trunk/Lib/test/test_profilehooks.py

Modified: python/trunk/Lib/test/test_profilehooks.py
==============================================================================
--- python/trunk/Lib/test/test_profilehooks.py	(original)
+++ python/trunk/Lib/test/test_profilehooks.py	Wed Oct 14 20:47:13 2009
@@ -110,7 +110,7 @@
 
     def test_exception(self):
         def f(p):
-            1/0
+            1./0
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
                               (1, 'return', f_ident),
@@ -118,7 +118,7 @@
 
     def test_caught_exception(self):
         def f(p):
-            try: 1/0
+            try: 1./0
             except: pass
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
@@ -127,7 +127,7 @@
 
     def test_caught_nested_exception(self):
         def f(p):
-            try: 1/0
+            try: 1./0
             except: pass
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
@@ -136,7 +136,7 @@
 
     def test_nested_exception(self):
         def f(p):
-            1/0
+            1./0
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
                               # This isn't what I expected:
@@ -147,7 +147,7 @@
 
     def test_exception_in_except_clause(self):
         def f(p):
-            1/0
+            1./0
         def g(p):
             try:
                 f(p)
@@ -166,7 +166,7 @@
 
     def test_exception_propogation(self):
         def f(p):
-            1/0
+            1./0
         def g(p):
             try: f(p)
             finally: p.add_event("falling through")
@@ -181,8 +181,8 @@
 
     def test_raise_twice(self):
         def f(p):
-            try: 1/0
-            except: 1/0
+            try: 1./0
+            except: 1./0
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
                               (1, 'return', f_ident),
@@ -190,7 +190,7 @@
 
     def test_raise_reraise(self):
         def f(p):
-            try: 1/0
+            try: 1./0
             except: raise
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
@@ -207,7 +207,7 @@
 
     def test_distant_exception(self):
         def f():
-            1/0
+            1./0
         def g():
             f()
         def h():
@@ -292,7 +292,7 @@
 
     def test_basic_exception(self):
         def f(p):
-            1/0
+            1./0
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
                               (1, 'return', f_ident),
@@ -300,7 +300,7 @@
 
     def test_caught_exception(self):
         def f(p):
-            try: 1/0
+            try: 1./0
             except: pass
         f_ident = ident(f)
         self.check_events(f, [(1, 'call', f_ident),
@@ -309,7 +309,7 @@
 
     def test_distant_exception(self):
         def f():
-            1/0
+            1./0
         def g():
             f()
         def h():


More information about the Python-checkins mailing list