some python3 related fixes

This commit is contained in:
holger krekel
2010-11-07 01:10:15 +01:00
parent 8716b391c7
commit d9ad2e7cce
6 changed files with 27 additions and 6 deletions

View File

@@ -325,6 +325,11 @@ class TestInvocationVariants:
result.stdout.fnmatch_lines([
"*1 passed*"
])
result = testdir.runpytest("--pyargs", ".")
assert result.ret == 0
result.stdout.fnmatch_lines([
"*2 passed*"
])
def test_cmdline_python_package_not_exists(self, testdir):
result = testdir.runpytest("--pyargs", "tpkgwhatv")
@@ -342,7 +347,7 @@ class TestInvocationVariants:
def test_hello(self):
assert self.attr
class RealTest(TestHello, unittest.TestCase):
class RealTest(unittest.TestCase, TestHello):
attr = 42
""")
reprec = testdir.inline_run(testpath)

View File

@@ -496,8 +496,6 @@ class Test_getinitialnodes:
config = testdir.reparseconfig([x])
col = testdir.getnode(config, x)
assert isinstance(col, py.test.collect.Module)
print col.obj
print col.listchain()
assert col.name == 'subdir/x.py'
assert col.parent.parent is None
for col in col.listchain():

View File

@@ -40,6 +40,17 @@ class TestParseIni:
"*tox.ini:2*requires*9.0*actual*"
])
@py.test.mark.xfail(reason="probably not needed")
def test_confcutdir(self, testdir):
sub = testdir.mkdir("sub")
sub.chdir()
testdir.makeini("""
[pytest]
addopts = --qwe
""")
result = testdir.runpytest("--confcutdir=.")
assert result.ret == 0
class TestConfigCmdlineParsing:
def test_parsing_again_fails(self, testdir):
config = testdir.reparseconfig([testdir.tmpdir])