mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-29958: Minor improvements to zipfile and tarfile CLI. (#944)
This commit is contained in:
parent
fd0cd07a5a
commit
150cd1916a
4 changed files with 28 additions and 14 deletions
|
@ -2140,6 +2140,16 @@ class CommandLineTest(unittest.TestCase):
|
|||
def zipfilecmd_failure(self, *args):
|
||||
return script_helper.assert_python_failure('-m', 'zipfile', *args)
|
||||
|
||||
def test_bad_use(self):
|
||||
rc, out, err = self.zipfilecmd_failure()
|
||||
self.assertEqual(out, b'')
|
||||
self.assertIn(b'usage', err.lower())
|
||||
self.assertIn(b'error', err.lower())
|
||||
self.assertIn(b'required', err.lower())
|
||||
rc, out, err = self.zipfilecmd_failure('-l', '')
|
||||
self.assertEqual(out, b'')
|
||||
self.assertNotEqual(err.strip(), b'')
|
||||
|
||||
def test_test_command(self):
|
||||
zip_name = findfile('zipdir.zip')
|
||||
for opt in '-t', '--test':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue