[pypy-commit] pypy py3.5: Fix test to work on PyPy

rlamy pypy.commits at gmail.com
Wed Nov 15 11:24:21 EST 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r93043:12f1fb4860ac
Date: 2017-11-15 16:23 +0000
http://bitbucket.org/pypy/pypy/changeset/12f1fb4860ac/

Log:	Fix test to work on PyPy

diff --git a/lib-python/3/test/test_inspect.py b/lib-python/3/test/test_inspect.py
--- a/lib-python/3/test/test_inspect.py
+++ b/lib-python/3/test/test_inspect.py
@@ -765,12 +765,15 @@
             self.assertFullArgSpecEquals(_pickle.Pickler(io.BytesIO()).dump,
                                         args_e=['self', 'obj'], formatted='(self, obj)')
 
+        # platform-dependent on PyPy
+        default_fd = os.stat.__kwdefaults__['dir_fd']
+
         self.assertFullArgSpecEquals(
              os.stat,
              args_e=['path'],
              kwonlyargs_e=['dir_fd', 'follow_symlinks'],
-             kwonlydefaults_e={'dir_fd': None, 'follow_symlinks': True},
-             formatted='(path, *, dir_fd=None, follow_symlinks=True)')
+             kwonlydefaults_e={'dir_fd': default_fd, 'follow_symlinks': True},
+             formatted='(path, *, dir_fd={}, follow_symlinks=True)'.format(default_fd))
 
     @unittest.skipIf(MISSING_C_DOCSTRINGS,
                      "Signature information for builtins requires docstrings")


More information about the pypy-commit mailing list