[py-svn] r61755 - py/branch/pytestplugin/py/test/plugin
hpk at codespeak.net
hpk at codespeak.net
Wed Feb 11 21:19:07 CET 2009
Author: hpk
Date: Wed Feb 11 21:19:07 2009
New Revision: 61755
Modified:
py/branch/pytestplugin/py/test/plugin/pytest_pytester.py
Log:
remove unused code
Modified: py/branch/pytestplugin/py/test/plugin/pytest_pytester.py
==============================================================================
--- py/branch/pytestplugin/py/test/plugin/pytest_pytester.py (original)
+++ py/branch/pytestplugin/py/test/plugin/pytest_pytester.py Wed Feb 11 21:19:07 2009
@@ -63,24 +63,13 @@
def parseconfig(self, *args):
return py.test.config._reparse(list(args))
- def _writeconftest(self):
- p = self.tmpdir.join("conftest.py")
- if p.check():
- return # don't overwrite
- pstring = repr(self._plugins)
- p.write("import py ; pytest_plugins = %s" % pstring)
- #else:
- # lines = p.readlines(cr=0)
- # for i, line in py.builtin.enumerate(lines):
- # if line.find("pytest_plugins") != -1:
- # lines[i] = line + ", %s" % pstring
- # break
- # else:
- # lines.append(pstring)
- # p.write("\n".join(lines))
-
def prepare(self):
- self._writeconftest()
+ p = self.tmpdir.join("conftest.py")
+ if not p.check():
+ pstring = repr(self._plugins)
+ p.write("import py ; pytest_plugins = %s" % pstring)
+ else:
+ assert not self._plugins
def popen(self, cmdargs, stdout, stderr, **kw):
if not hasattr(py.std, 'subprocess'):
More information about the pytest-commit
mailing list