summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_b2.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-01-26 13:04:43 (GMT)
committerGuido van Rossum <guido@python.org>1993-01-26 13:04:43 (GMT)
commit35fb82a33f4bc78be1f7d219b8ebd078b37c90cb (patch)
tree1075bc3db6c7e05e13fb9e247b447c1e085c3cfe /Lib/test/test_b2.py
parent93f07400737a430ce642b4e7f6c9bd3e4460229c (diff)
downloadcpython-35fb82a33f4bc78be1f7d219b8ebd078b37c90cb.zip
cpython-35fb82a33f4bc78be1f7d219b8ebd078b37c90cb.tar.gz
cpython-35fb82a33f4bc78be1f7d219b8ebd078b37c90cb.tar.bz2
* os.py: _exit doesn't exist in all variations of posix
* Added fcmp() to test_support.py and use it in test*.py
Diffstat (limited to 'Lib/test/test_b2.py')
-rw-r--r--Lib/test/test_b2.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_b2.py b/Lib/test/test_b2.py
index 568ed97..f376f46 100644
--- a/Lib/test/test_b2.py
+++ b/Lib/test/test_b2.py
@@ -71,21 +71,21 @@ if pow(-2L,1) <> -2: raise TestFailed, 'pow(-2L,1)'
if pow(-2L,2) <> 4: raise TestFailed, 'pow(-2L,2)'
if pow(-2L,3) <> -8: raise TestFailed, 'pow(-2L,3)'
#
-if pow(0.,0) <> 1.: raise TestFailed, 'pow(0.,0)'
-if pow(0.,1) <> 0.: raise TestFailed, 'pow(0.,1)'
-if pow(1.,0) <> 1.: raise TestFailed, 'pow(1.,0)'
-if pow(1.,1) <> 1.: raise TestFailed, 'pow(1.,1)'
+if fcmp(pow(0.,0), 1.): raise TestFailed, 'pow(0.,0)'
+if fcmp(pow(0.,1), 0.): raise TestFailed, 'pow(0.,1)'
+if fcmp(pow(1.,0), 1.): raise TestFailed, 'pow(1.,0)'
+if fcmp(pow(1.,1), 1.): raise TestFailed, 'pow(1.,1)'
#
-if pow(2.,0) <> 1.: raise TestFailed, 'pow(2.,0)'
-if pow(2.,10) <> 1024.: raise TestFailed, 'pow(2.,10)'
-if pow(2.,20) <> 1024.*1024.: raise TestFailed, 'pow(2.,20)'
-if pow(2.,30) <> 1024.*1024.*1024.: raise TestFailed, 'pow(2.,30)'
+if fcmp(pow(2.,0), 1.): raise TestFailed, 'pow(2.,0)'
+if fcmp(pow(2.,10), 1024.): raise TestFailed, 'pow(2.,10)'
+if fcmp(pow(2.,20), 1024.*1024.): raise TestFailed, 'pow(2.,20)'
+if fcmp(pow(2.,30), 1024.*1024.*1024.): raise TestFailed, 'pow(2.,30)'
#
# XXX These don't work -- negative float to the float power...
-#if pow(-2.,0) <> 1.: raise TestFailed, 'pow(-2.,0)'
-#if pow(-2.,1) <> -2.: raise TestFailed, 'pow(-2.,1)'
-#if pow(-2.,2) <> 4.: raise TestFailed, 'pow(-2.,2)'
-#if pow(-2.,3) <> -8.: raise TestFailed, 'pow(-2.,3)'
+#if fcmp(pow(-2.,0), 1.): raise TestFailed, 'pow(-2.,0)'
+#if fcmp(pow(-2.,1), -2.): raise TestFailed, 'pow(-2.,1)'
+#if fcmp(pow(-2.,2), 4.): raise TestFailed, 'pow(-2.,2)'
+#if fcmp(pow(-2.,3), -8.): raise TestFailed, 'pow(-2.,3)'
print 'range'
if range(3) <> [0, 1, 2]: raise TestFailed, 'range(3)'