[pypy-svn] r51227 - pypy/dist/pypy/interpreter/pyparser/test
exarkun at codespeak.net
exarkun at codespeak.net
Sun Feb 3 16:22:26 CET 2008
Author: exarkun
Date: Sun Feb 3 16:22:25 2008
New Revision: 51227
Modified:
pypy/dist/pypy/interpreter/pyparser/test/test_samples.py
Log:
Order the parsing samples by filename before yielding them to the test runner; this makes it more likely that each sample will have the same test name each time the tests are run
Modified: pypy/dist/pypy/interpreter/pyparser/test/test_samples.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/test/test_samples.py (original)
+++ pypy/dist/pypy/interpreter/pyparser/test/test_samples.py Sun Feb 3 16:22:25 2008
@@ -72,9 +72,15 @@
samples_dir = py.magic.autopath().dirpath("samples")
for use_lookahead in (True, False):
grammar.USE_LOOKAHEAD = use_lookahead
- for path in samples_dir.listdir("*.py"):
+ sample_paths = samples_dir.listdir("*.py")
+ # Make it as likely as possible (without tons of effort) that each
+ # sample will have the same test name in each run.
+ sample_paths.sort()
+ for path in sample_paths:
fname = path.basename
if fname in SKIP_ALWAYS:
+ yield lambda: py.test.skip(
+ "%r is set to always skip." % (fname,))
continue
if GRAMMAR_MISMATCH and fname in SKIP_IF_NOT_NATIVE:
yield lambda: py.test.skip(
More information about the Pypy-commit
mailing list