mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 02:08:54 +00:00
move help cmd tests to own module
This commit is contained in:
parent
e27bb0c1d0
commit
cc79c98b98
2 changed files with 15 additions and 11 deletions
|
@ -1935,17 +1935,6 @@ def test_common_options(self):
|
||||||
log = self.cmd(f"--repo={self.repository_location}", "--debug", "create", "test", "input")
|
log = self.cmd(f"--repo={self.repository_location}", "--debug", "create", "test", "input")
|
||||||
assert "security: read previous location" in log
|
assert "security: read previous location" in log
|
||||||
|
|
||||||
def test_usage(self):
|
|
||||||
self.cmd()
|
|
||||||
self.cmd("-h")
|
|
||||||
|
|
||||||
def test_help(self):
|
|
||||||
assert "Borg" in self.cmd("help")
|
|
||||||
assert "patterns" in self.cmd("help", "patterns")
|
|
||||||
assert "creates a new, empty repository" in self.cmd("help", "rcreate")
|
|
||||||
assert "positional arguments" not in self.cmd("help", "rcreate", "--epilog-only")
|
|
||||||
assert "creates a new, empty repository" not in self.cmd("help", "rcreate", "--usage-only")
|
|
||||||
|
|
||||||
def test_init_interrupt(self):
|
def test_init_interrupt(self):
|
||||||
def raise_eof(*args, **kwargs):
|
def raise_eof(*args, **kwargs):
|
||||||
raise EOFError
|
raise EOFError
|
||||||
|
|
15
src/borg/testsuite/archiver/help_cmd.py
Normal file
15
src/borg/testsuite/archiver/help_cmd.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
from ...constants import * # NOQA
|
||||||
|
from . import ArchiverTestCaseBase
|
||||||
|
|
||||||
|
|
||||||
|
class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
|
def test_usage(self):
|
||||||
|
self.cmd()
|
||||||
|
self.cmd("-h")
|
||||||
|
|
||||||
|
def test_help(self):
|
||||||
|
assert "Borg" in self.cmd("help")
|
||||||
|
assert "patterns" in self.cmd("help", "patterns")
|
||||||
|
assert "creates a new, empty repository" in self.cmd("help", "rcreate")
|
||||||
|
assert "positional arguments" not in self.cmd("help", "rcreate", "--epilog-only")
|
||||||
|
assert "creates a new, empty repository" not in self.cmd("help", "rcreate", "--usage-only")
|
Loading…
Reference in a new issue