mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
Fix test failures on Python 2 by wrapping cli calls in unicode_to_argv.
This commit is contained in:
parent
d59d64d6bd
commit
746e1b2664
@ -178,7 +178,7 @@ class CreateNode(unittest.TestCase):
|
||||
|
||||
n1 = os.path.join(basedir, command + "-n1")
|
||||
argv = ["--quiet", command, "--basedir", n1] + list(args)
|
||||
rc, out, err = yield run_cli(*argv)
|
||||
rc, out, err = yield run_cli(*map(unicode_to_argv, argv))
|
||||
self.failUnlessEqual(err, "")
|
||||
self.failUnlessEqual(out, "")
|
||||
self.failUnlessEqual(rc, 0)
|
||||
@ -198,7 +198,7 @@ class CreateNode(unittest.TestCase):
|
||||
self.failUnless("\nreserved_space = 1G\n" in content)
|
||||
|
||||
# creating the node a second time should be rejected
|
||||
rc, out, err = yield run_cli(*argv)
|
||||
rc, out, err = yield run_cli(*map(unicode_to_argv, argv))
|
||||
self.failIfEqual(rc, 0, str((out, err, rc)))
|
||||
self.failUnlessEqual(out, "")
|
||||
self.failUnless("is not empty." in err)
|
||||
@ -211,7 +211,7 @@ class CreateNode(unittest.TestCase):
|
||||
# test that the non --basedir form works too
|
||||
n2 = os.path.join(basedir, command + "-n2")
|
||||
argv = ["--quiet", command] + list(args) + [n2]
|
||||
rc, out, err = yield run_cli(*argv)
|
||||
rc, out, err = yield run_cli(*map(unicode_to_argv, argv))
|
||||
self.failUnlessEqual(err, "")
|
||||
self.failUnlessEqual(out, "")
|
||||
self.failUnlessEqual(rc, 0)
|
||||
@ -221,7 +221,7 @@ class CreateNode(unittest.TestCase):
|
||||
# test the --node-directory form
|
||||
n3 = os.path.join(basedir, command + "-n3")
|
||||
argv = ["--quiet", "--node-directory", n3, command] + list(args)
|
||||
rc, out, err = yield run_cli(*argv)
|
||||
rc, out, err = yield run_cli(*map(unicode_to_argv, argv))
|
||||
self.failUnlessEqual(err, "")
|
||||
self.failUnlessEqual(out, "")
|
||||
self.failUnlessEqual(rc, 0)
|
||||
@ -232,7 +232,7 @@ class CreateNode(unittest.TestCase):
|
||||
# test that the output (without --quiet) includes the base directory
|
||||
n4 = os.path.join(basedir, command + "-n4")
|
||||
argv = [command] + list(args) + [n4]
|
||||
rc, out, err = yield run_cli(*argv)
|
||||
rc, out, err = yield run_cli(*map(unicode_to_argv, argv))
|
||||
self.failUnlessEqual(err, "")
|
||||
self.failUnlessIn(" created in ", out)
|
||||
self.failUnlessIn(n4, out)
|
||||
|
Loading…
x
Reference in New Issue
Block a user