Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r95297:956dce5d3456 Date: 2018-11-11 00:25 -0800 http://bitbucket.org/pypy/pypy/changeset/956dce5d3456/
Log: fix tests to pass on win32 diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py --- a/pypy/module/posix/test/test_posix2.py +++ b/pypy/module/posix/test/test_posix2.py @@ -211,9 +211,9 @@ def test_pickle(self): import pickle, os st = self.posix.stat(os.curdir) - print type(st).__module__ + # print type(st).__module__ s = pickle.dumps(st) - print repr(s) + # print repr(s) new = pickle.loads(s) assert new == st assert type(new) is type(st) @@ -303,7 +303,7 @@ try: fid = posix.fdopen(fd) fid.read(10) - except OSError as e: + except (IOError, OSError) as e: assert e.errno == errno.EBADF else: assert False, "using result of fdopen(fd) on closed file must raise" @@ -576,6 +576,12 @@ assert '\nOSError: [Errno 9]' in res else: assert res == 'test1\n' + if sys.platform == "win32": + # using startfile in app_startfile creates global state + test_popen.dont_track_allocations = True + test_popen_with.dont_track_allocations = True + test_popen_child_fds.dont_track_allocations = True + if hasattr(__import__(os.name), '_getfullpathname'): def test__getfullpathname(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit