summaryrefslogtreecommitdiff
path: root/tests/test_climat2.py
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor2018-08-31 21:33:42 -0400
committerDaniel Kahn Gillmor2018-09-04 18:28:04 -0400
commit10d60bd39822670c55b84cb9d13dce8aea78bc40 (patch)
tree30e21f708ef916e62d747e2d5c7afb05b897afb9 /tests/test_climat2.py
parent4192a2daa3a24674740ed38913ff40309d6c1a31 (diff)
add --unknown-members argument to mat2
This allows the user to make use of parser.unknown_member_policy for archive formats. At the suggestion of @jvoisin, it also prints a scary warning if the user explicitly chooses 'keep'.
Diffstat (limited to 'tests/test_climat2.py')
-rw-r--r--tests/test_climat2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_climat2.py b/tests/test_climat2.py
index af89c0e..6ee84d5 100644
--- a/tests/test_climat2.py
+++ b/tests/test_climat2.py
@@ -8,12 +8,14 @@ class TestHelp(unittest.TestCase):
8 def test_help(self): 8 def test_help(self):
9 proc = subprocess.Popen(['./mat2', '--help'], stdout=subprocess.PIPE) 9 proc = subprocess.Popen(['./mat2', '--help'], stdout=subprocess.PIPE)
10 stdout, _ = proc.communicate() 10 stdout, _ = proc.communicate()
11 self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-s | -L] [files [files ...]]', stdout) 11 self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-u POLICY] [-s | -L] [files [files ...]]',
12 stdout)
12 13
13 def test_no_arg(self): 14 def test_no_arg(self):
14 proc = subprocess.Popen(['./mat2'], stdout=subprocess.PIPE) 15 proc = subprocess.Popen(['./mat2'], stdout=subprocess.PIPE)
15 stdout, _ = proc.communicate() 16 stdout, _ = proc.communicate()
16 self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-s | -L] [files [files ...]]', stdout) 17 self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-u POLICY] [-s | -L] [files [files ...]]',
18 stdout)
17 19
18 20
19class TestVersion(unittest.TestCase): 21class TestVersion(unittest.TestCase):