Ronny Pfannschmidt committed 2840e78

move prepared files to a own autouse fixture

Comments (0)

Files changed (1)


 @pytest.fixture(scope='session', params=metadata.backends)
 def vcs(request):
     wanted = request.config.getvalue('vcs')
-    if wanted and testcontext.param != wanted:
-        pytest.skip('%s not wanted for this test run' % testcontext.param)
+    if wanted and request.param != wanted:
+        pytest.skip('%s not wanted for this test run' % request.param)
     return request.param
     if the feature "wd:heavy" is not supported use repo as help
     if 'wd:heavy' not in mgr.backend.features:
-        #repo = testcontext.getfuncargvalue('repo')
         wd = mgr.create_wd('wd', repo)
         wd = mgr.create_wd('wd')
+    return wd
+def prepared_files(request):
+    print request, dir(request)
     fp = request.function
     if hasattr(fp, 'files'):
+        wd = request.getfuncargvalue('wd')
         files = fp.files.args[0]
         assert wd.has_files(*files)
         if  hasattr(fp, 'commit'):
             wd.commit(message='initial commit')
-    return wd
-def pytest_collect_directory(path, parent):
-    for compiled_module in path.listdir("*.pyc"):
-        if not".py").check():
-            compiled_module.remove()