fixes to various tests, related to execnet automatic ID generation and other bits.
also lowering the version as "1.1.1post1" for now. 1.1.2 is still a bit off. --HG-- branch : trunk
This commit is contained in:
6
testing/pytest/dist/acceptance_test.py
vendored
6
testing/pytest/dist/acceptance_test.py
vendored
@@ -49,8 +49,8 @@ class TestDistribution:
|
||||
)
|
||||
result = testdir.runpytest(p1, '-d', '--tx=popen', '--tx=popen')
|
||||
result.stdout.fnmatch_lines([
|
||||
"*0*popen*Python*",
|
||||
"*1*popen*Python*",
|
||||
"*2*popen*Python*",
|
||||
"*2 failed, 1 passed, 1 skipped*",
|
||||
])
|
||||
assert result.ret == 1
|
||||
@@ -73,9 +73,9 @@ class TestDistribution:
|
||||
""")
|
||||
result = testdir.runpytest(p1, '-d')
|
||||
result.stdout.fnmatch_lines([
|
||||
"*0*popen*Python*",
|
||||
"*1*popen*Python*",
|
||||
"*2*popen*Python*",
|
||||
"*3*popen*Python*",
|
||||
"*2 failed, 1 passed, 1 skipped*",
|
||||
])
|
||||
assert result.ret == 1
|
||||
@@ -122,7 +122,7 @@ class TestDistribution:
|
||||
"--tx=popen//chdir=%(dest)s" % locals(), p)
|
||||
assert result.ret == 0
|
||||
result.stdout.fnmatch_lines([
|
||||
"*1* *popen*platform*",
|
||||
"*0* *popen*platform*",
|
||||
#"RSyncStart: [G1]",
|
||||
#"RSyncFinished: [G1]",
|
||||
"*1 passed*"
|
||||
|
||||
6
testing/pytest/dist/test_gwmanage.py
vendored
6
testing/pytest/dist/test_gwmanage.py
vendored
@@ -37,10 +37,10 @@ class TestGatewayManagerPopen:
|
||||
hm.makegateways()
|
||||
call = hookrecorder.popcall("pytest_gwmanage_newgateway")
|
||||
assert call.gateway.spec == execnet.XSpec("popen")
|
||||
assert call.gateway.id == "1"
|
||||
assert call.gateway.id == "gw0"
|
||||
assert call.platinfo.executable == call.gateway._rinfo().executable
|
||||
call = hookrecorder.popcall("pytest_gwmanage_newgateway")
|
||||
assert call.gateway.id == "2"
|
||||
assert call.gateway.id == "gw1"
|
||||
assert len(hm.group) == 2
|
||||
hm.exit()
|
||||
assert not len(hm.group)
|
||||
@@ -66,7 +66,7 @@ class TestGatewayManagerPopen:
|
||||
l = []
|
||||
hm.rsync(source, notify=lambda *args: l.append(args))
|
||||
assert len(l) == 1
|
||||
assert l[0] == ("rsyncrootready", hm.group['1'].spec, source)
|
||||
assert l[0] == ("rsyncrootready", hm.group['gw0'].spec, source)
|
||||
hm.exit()
|
||||
dest = dest.join(source.basename)
|
||||
assert dest.join("dir1").check()
|
||||
|
||||
6
testing/pytest/dist/test_txnode.py
vendored
6
testing/pytest/dist/test_txnode.py
vendored
@@ -79,7 +79,7 @@ class TestMasterSlaveConnection:
|
||||
node.send(123) # invalid item
|
||||
kwargs = mysetup.geteventargs("pytest_testnodedown")
|
||||
assert kwargs['node'] is node
|
||||
assert str(kwargs['error']).find("AttributeError") != -1
|
||||
assert "Not properly terminated" in str(kwargs['error'])
|
||||
|
||||
def test_crash_killed(self, testdir, mysetup):
|
||||
if not hasattr(py.std.os, 'kill'):
|
||||
@@ -87,13 +87,13 @@ class TestMasterSlaveConnection:
|
||||
item = testdir.getitem("""
|
||||
def test_func():
|
||||
import os
|
||||
os.kill(os.getpid(), 15)
|
||||
os.kill(os.getpid(), 9)
|
||||
""")
|
||||
node = mysetup.makenode(item.config)
|
||||
node.send(item)
|
||||
kwargs = mysetup.geteventargs("pytest_testnodedown")
|
||||
assert kwargs['node'] is node
|
||||
assert str(kwargs['error']).find("Not properly terminated") != -1
|
||||
assert "Not properly terminated" in str(kwargs['error'])
|
||||
|
||||
def test_node_down(self, mysetup):
|
||||
node = mysetup.makenode()
|
||||
|
||||
Reference in New Issue
Block a user