Exemplo n.º 1
0
 def test_getrsyncdirs(self, testdir):
     config = testdir.parseconfigure('--rsyncdir=' + str(testdir.tmpdir))
     nm = NodeManager(config, specs=[execnet.XSpec("popen")])
     assert not nm._getrsyncdirs()
     nm = NodeManager(config, specs=[execnet.XSpec("popen//chdir=qwe")])
     assert nm.roots
     assert testdir.tmpdir in nm.roots
Exemplo n.º 2
0
 def test_getrsyncdirs(self, testdir):
     config = testdir.parseconfigure('--rsyncdir=' + str(testdir.tmpdir))
     nm = NodeManager(config, specs=[execnet.XSpec("popen")])
     assert not nm._getrsyncdirs()
     nm = NodeManager(config, specs=[execnet.XSpec("popen//chdir=qwe")])
     assert nm.roots
     assert testdir.tmpdir in nm.roots
Exemplo n.º 3
0
 def test_getrsyncdirs_with_conftest(self, testdir):
     p = py.path.local()
     for bn in 'x y z'.split():
         p.mkdir(bn)
     testdir.makeini("""
         [pytest]
         rsyncdirs= x
     """)
     config = testdir.parseconfigure(
         testdir.tmpdir, '--rsyncdir=y', '--rsyncdir=z')
     nm = NodeManager(config, specs=[execnet.XSpec("popen//chdir=xyz")])
     roots = nm._getrsyncdirs()
     # assert len(roots) == 3 + 1 # pylib
     assert py.path.local('y') in roots
     assert py.path.local('z') in roots
     assert testdir.tmpdir.join('x') in roots
Exemplo n.º 4
0
 def test_getrsyncdirs_with_conftest(self, testdir):
     p = py.path.local()
     for bn in 'x y z'.split():
         p.mkdir(bn)
     testdir.makeini("""
         [pytest]
         rsyncdirs= x
     """)
     config = testdir.parseconfigure(testdir.tmpdir, '--rsyncdir=y',
                                     '--rsyncdir=z')
     nm = NodeManager(config, specs=[execnet.XSpec("popen//chdir=xyz")])
     roots = nm._getrsyncdirs()
     # assert len(roots) == 3 + 1 # pylib
     assert py.path.local('y') in roots
     assert py.path.local('z') in roots
     assert testdir.tmpdir.join('x') in roots