[pypy-svn] r23356 - pypy/dist/pypy/tool/test

nik at codespeak.net nik at codespeak.net
Wed Feb 15 12:42:49 CET 2006


Author: nik
Date: Wed Feb 15 12:42:48 2006
New Revision: 23356

Modified:
   pypy/dist/pypy/tool/test/test_getdocstrings.py
Log:
fix failure in test_getdocstring by testing against less static data.


Modified: pypy/dist/pypy/tool/test/test_getdocstrings.py
==============================================================================
--- pypy/dist/pypy/tool/test/test_getdocstrings.py	(original)
+++ pypy/dist/pypy/tool/test/test_getdocstrings.py	Wed Feb 15 12:42:48 2006
@@ -1,6 +1,6 @@
 import autopath
 from os import listdir
-import py, re
+import glob, os.path, py, re
 
 this_dir = autopath.this_dir
 pypy_dir = autopath.pypydir
@@ -19,13 +19,13 @@
     def test_mkfilelist(self):
         l = mk_std_filelist()
         l.sort()
-        check = [
-            'basestringtype.py', 'unicodetype.py', 'inttype.py',
-            'nonetype.py', 'longtype.py', 'slicetype.py',
-            'itertype.py', 'floattype.py',
-            'dicttype.py', 'dictproxytype.py', 'tupletype.py',
-            'booltype.py', 'objecttype.py', 'stringtype.py',
-            'listtype.py']
+        type_files = os.path.join(pypy_dir, "objspace/std/*type.py")
+        not_wanted = ["typetype.py"]
+        check = []
+        for path in glob.glob(type_files):
+            module = os.path.split(path)[1]
+            if module not in not_wanted:
+                check.append(module)
         check.sort()
         assert l == check
 



More information about the Pypy-commit mailing list