1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +00:00

move help cmd tests to own module

This commit is contained in:
Thomas Waldmann 2022-09-12 23:42:34 +02:00
parent e27bb0c1d0
commit cc79c98b98
2 changed files with 15 additions and 11 deletions

View file

@ -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

View 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")