2
0
Эх сурвалжийг харах

move help cmd tests to own module

Thomas Waldmann 2 жил өмнө
parent
commit
cc79c98b98

+ 0 - 11
src/borg/testsuite/archiver/__init__.py

@@ -1935,17 +1935,6 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         log = self.cmd(f"--repo={self.repository_location}", "--debug", "create", "test", "input")
         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 raise_eof(*args, **kwargs):
             raise EOFError

+ 15 - 0
src/borg/testsuite/archiver/help_cmd.py

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