diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-06-11 06:22:31 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-06-11 06:22:31 (GMT) |
commit | f90ae20354ceb501f0ba0b6459df17f1a8005a47 (patch) | |
tree | f9aae742cfa33ba10af2ed8152aff802430f626c /Lib/test | |
parent | 7981ce576c719e291dc901a3463e725b6be3c50e (diff) | |
download | cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.zip cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.tar.gz cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.tar.bz2 |
Patch #488073: AtheOS port.
Diffstat (limited to 'Lib/test')
-rwxr-xr-x | Lib/test/regrtest.py | 28 | ||||
-rwxr-xr-x | Lib/test/test_fcntl.py | 3 | ||||
-rw-r--r-- | Lib/test/test_file.py | 7 | ||||
-rw-r--r-- | Lib/test/test_mhlib.py | 2 | ||||
-rw-r--r-- | Lib/test/test_os.py | 8 | ||||
-rw-r--r-- | Lib/test/test_popen2.py | 5 |
6 files changed, 48 insertions, 5 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ec72557..77ae9c5 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -721,6 +721,34 @@ _expectations = { test_zipfile test_zlib """, + 'atheos': + """ + test_al + test_cd + test_cl + test_curses + test_dl + test_email_codecs + test_gdbm + test_gl + test_imgfile + test_largefile + test_linuxaudiodev + test_locale + test_mhlib + test_mmap + test_mpz + test_nis + test_poll + test_popen2 + test_resource + test_socket_ssl + test_socketserver + test_sunaudiodev + test_unicode_file + test_winreg + test_winsound + """, } class _ExpectedSkips: diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index c4e47ad..cc4f213 100755 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -17,6 +17,9 @@ except AttributeError: else: start_len = "qq" +if sys.platform.startswith('atheos'): + start_len = "qq" + if sys.platform in ('netbsd1', 'Darwin1.2', 'darwin', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index 71222c1..261db2c 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -1,3 +1,4 @@ +import sys import os from array import array @@ -88,7 +89,11 @@ f.close() if not f.closed: raise TestFailed, 'file.closed should be true' -for methodname in ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ]: +methods = ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ] +if sys.platform.startswith('atheos'): + methods.remove('truncate') + +for methodname in methods: method = getattr(f, methodname) try: method() diff --git a/Lib/test/test_mhlib.py b/Lib/test/test_mhlib.py index 91c1a1a..ef5877d 100644 --- a/Lib/test/test_mhlib.py +++ b/Lib/test/test_mhlib.py @@ -12,7 +12,7 @@ import os, StringIO import sys import mhlib -if sys.platform.startswith("win") or sys.platform=="riscos": +if sys.platform.startswith("win") or sys.platform=="riscos" or sys.platform.startswith("atheos"): raise TestSkipped("test_mhlib skipped on %s -- "%sys.platform + "too many Unix assumptions") diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 12c016b..735d4cb 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -139,7 +139,13 @@ class StatAttributeTests(unittest.TestCase): return import statvfs - result = os.statvfs(self.fname) + try: + result = os.statvfs(self.fname) + except OSError, e: + # On AtheOS, glibc always returns ENOSYS + import errno + if e.errno == errno.ENOSYS: + return # Make sure direct access works self.assertEquals(result.f_bfree, result[statvfs.F_BFREE]) diff --git a/Lib/test/test_popen2.py b/Lib/test/test_popen2.py index 799df4a..c67dd71 100644 --- a/Lib/test/test_popen2.py +++ b/Lib/test/test_popen2.py @@ -14,11 +14,12 @@ from test_support import TestSkipped def main(): print "Test popen2 module:" - if sys.platform[:4] == 'beos' and __name__ != '__main__': + if (sys.platform[:4] == 'beos' or sys.platform[:6] == 'atheos') \ + and __name__ != '__main__': # Locks get messed up or something. Generally we're supposed # to avoid mixing "posix" fork & exec with native threads, and # they may be right about that after all. - raise TestSkipped, "popen2() doesn't work during import on BeOS" + raise TestSkipped, "popen2() doesn't work during import on " + sys.platform try: from os import popen except ImportError: |