[py-svn] commit/pytest-xdist: hpk42: fix tests by properly removing __pycache__ files
Bitbucket
commits-noreply at bitbucket.org
Thu Dec 15 07:41:52 CET 2011
1 new commit in pytest-xdist:
https://bitbucket.org/hpk42/pytest-xdist/changeset/815039684ac9/
changeset: 815039684ac9
user: hpk42
date: 2011-12-15 07:41:09
summary: fix tests by properly removing __pycache__ files
affected #: 2 files
diff -r 4c9af0621fae3440b5e3e988e6b5fb2351fca3b7 -r 815039684ac977f374508103a48941b106dbb394 setup.py
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@
packages = ['xdist'],
entry_points = {'pytest11': ['xdist = xdist.plugin'],},
zip_safe=False,
- install_requires = ['execnet>=1.0.8', 'pytest>=2.2.1.dev2'],
+ install_requires = ['execnet>=1.0.8', 'pytest>=2.2.1.dev5'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff -r 4c9af0621fae3440b5e3e988e6b5fb2351fca3b7 -r 815039684ac977f374508103a48941b106dbb394 testing/test_looponfail.py
--- a/testing/test_looponfail.py
+++ b/testing/test_looponfail.py
@@ -88,16 +88,14 @@
assert not failures
def test_failures_somewhere(self, testdir):
- item = testdir.getitem("def test_func(): assert 0\n")
+ item = testdir.getitem("def test_func():\n assert 0\n")
control = RemoteControl(item.config)
control.setup()
failures = control.runsession()
assert failures
control.setup()
- item.fspath.write("def test_func(): assert 1\n")
- pyc = item.fspath.new(ext=".pyc")
- if pyc.check():
- pyc.remove()
+ item.fspath.write("def test_func():\n assert 1\n")
+ removepyc(item.fspath)
topdir, failures = control.runsession()[:2]
assert not failures
@@ -115,9 +113,7 @@
def test_new():
assert 0
"""))
- pyc = modcol.fspath.new(ext=".pyc")
- if pyc.check():
- pyc.remove()
+ removepyc(modcol.fspath)
control.loop_once()
assert not control.failures
control.loop_once()
@@ -252,4 +248,7 @@
pyc = path + "c"
if pyc.check():
pyc.remove()
+ c = path.dirpath("__pycache__")
+ if c.check():
+ c.remove()
Repository URL: https://bitbucket.org/hpk42/pytest-xdist/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list