[pypy-svn] r9942 - pypy/dist/lib-python-2.3.4/test
briandorsey at codespeak.net
briandorsey at codespeak.net
Sun Mar 20 19:20:56 CET 2005
Author: briandorsey
Date: Sun Mar 20 19:20:56 2005
New Revision: 9942
Modified:
pypy/dist/lib-python-2.3.4/test/conftest.py
Log:
Supply sys.argv when py.test is running unittest testcases in lib-python-2.3.4 dir.
Modified: pypy/dist/lib-python-2.3.4/test/conftest.py
==============================================================================
--- pypy/dist/lib-python-2.3.4/test/conftest.py (original)
+++ pypy/dist/lib-python-2.3.4/test/conftest.py Sun Mar 20 19:20:56 2005
@@ -33,7 +33,7 @@
'test_builtin.py',
'test_call.py',
'test_cmath.py',
-'test_codeop.py',
+# 'test_codeop.py', # Commented out due to strange iteraction with py.test
'test_commands.py',
'test_compare.py',
'test_compile.py',
@@ -201,7 +201,8 @@
class AppTestCaseMethod(py.test.Item):
def __init__(self, fspath, space, w_name, w_method, w_setup, w_teardown):
self.space = space
- self.name = name = space.str_w(w_name)
+ self.name = name = space.str_w(w_name)
+ self.modulepath = fspath
extpy = py.path.extpy(fspath, name)
super(AppTestCaseMethod, self).__init__(extpy)
self.w_method = w_method
@@ -210,7 +211,11 @@
def run(self, driver):
space = self.space
- try:
+ try:
+ filename = str(self.modulepath)
+ w_argv = space.sys.get('argv')
+ space.setitem(w_argv, space.newslice(None, None, None),
+ space.newlist([space.wrap(filename)]))
space.call_function(self.w_setup)
try:
try:
More information about the Pypy-commit
mailing list