summaryrefslogtreecommitdiffstats
path: root/Modules/fcntlmodule.c
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2010-05-10 23:30:25 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2010-05-10 23:30:25 (GMT)
commit2b14676f0fa3123ebedd017e7241c812584529ec (patch)
tree10c9bd17c00722ca48d419e0943d0c0838a60d4e /Modules/fcntlmodule.c
parentd6d058feae6df02c1db658ad1796b2e4371c2300 (diff)
downloadcpython-2b14676f0fa3123ebedd017e7241c812584529ec.zip
cpython-2b14676f0fa3123ebedd017e7241c812584529ec.tar.gz
cpython-2b14676f0fa3123ebedd017e7241c812584529ec.tar.bz2
Merged revisions 81073 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81073 | andrew.kuchling | 2010-05-10 19:27:01 -0400 (Mon, 10 May 2010) | 1 line Use ';' after initialization macros to avoid confusing re-indenters ........
Diffstat (limited to 'Modules/fcntlmodule.c')
0 files changed, 0 insertions, 0 deletions
t/cpython.git/diff/Lib/test/test_b2.py?h=v3.11.8&id=35fb82a33f4bc78be1f7d219b8ebd078b37c90cb'>Lib/test/test_b2.py24
-rw-r--r--Lib/test/test_support.py19
4 files changed, 45 insertions, 19 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 556268f..dc1ef5a 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -18,7 +18,10 @@
try:
from posix import *
- from posix import _exit
+ try:
+ from posix import _exit
+ except ImportError:
+ pass
name = 'posix'
curdir = '.'
pardir = '..'
diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py
index b780c72..e5611e5 100644
--- a/Lib/test/test_b1.py
+++ b/Lib/test/test_b1.py
@@ -42,9 +42,9 @@ if cmp(1, -1) <> 1: raise TestFailed, 'cmp(1, -1)'
if cmp(1, 1) <> 0: raise TestFailed, 'cmp(1, 1)'
print 'coerce'
-if coerce(1, 1.1) <> (1.0, 1.1): raise TestFailed, 'coerce(1, 1.1)'
+if fcmp(coerce(1, 1.1), (1.0, 1.1)): raise TestFailed, 'coerce(1, 1.1)'
if coerce(1, 1L) <> (1L, 1L): raise TestFailed, 'coerce(1, 1L)'
-if coerce(1L, 1.1) <> (1.0, 1.1): raise TestFailed, 'coerce(1L, 1.1)'
+if fcmp(coerce(1L, 1.1), (1.0, 1.1)): raise TestFailed, 'coerce(1L, 1.1)'
print 'dir'
x = 1
@@ -68,10 +68,14 @@ if divmod(-12, 7L) <> (-2, 2L): raise TestFailed, 'divmod(-12, 7L)'
if divmod(12L, -7) <> (-2L, -2): raise TestFailed, 'divmod(12L, -7)'
if divmod(-12L, -7) <> (1L, -5): raise TestFailed, 'divmod(-12L, -7)'
#
-if divmod(3.25, 1.0) <> (3.0, 0.25): raise TestFailed, 'divmod(3.25, 1.0)'
-if divmod(-3.25, 1.0) <> (-4.0, 0.75): raise TestFailed, 'divmod(-3.25, 1.0)'
-if divmod(3.25, -1.0) <> (-4.0, -0.75): raise TestFailed, 'divmod(3.25, -1.0)'
-if divmod(-3.25, -1.0) <> (3.0, -0.25): raise TestFailed, 'divmod(-3.25, -1.0)'
+if fcmp(divmod(3.25, 1.0), (3.0, 0.25)):
+ raise TestFailed, 'divmod(3.25, 1.0)'
+if fcmp(divmod(-3.25, 1.0), (-4.0, 0.75)):
+ raise TestFailed, 'divmod(-3.25, 1.0)'
+if fcmp(divmod(3.25, -1.0), (-4.0, -0.75)):
+ raise TestFailed, 'divmod(3.25, -1.0)'
+if fcmp(divmod(-3.25, -1.0), (3.0, -0.25)):
+ raise TestFailed, 'divmod(-3.25, -1.0)'
print 'eval'
if eval('1+1') <> 2: raise TestFailed, 'eval(\'1+1\')'
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)'
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py