Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
a0fd52f
1
Parent(s):
d8d6e2b
Simplify CLI test
Browse files- pysr/test/test_cli.py +2 -9
pysr/test/test_cli.py
CHANGED
@@ -13,13 +13,6 @@ def run_command(command):
|
|
13 |
)
|
14 |
|
15 |
|
16 |
-
def make_command(command):
|
17 |
-
"""
|
18 |
-
Convert string into list with LF formatting (for unix systems), using \n delimiter
|
19 |
-
"""
|
20 |
-
return "\n".join(command)
|
21 |
-
|
22 |
-
|
23 |
class TestCli(unittest.TestCase):
|
24 |
def test_help_on_all_commands(self):
|
25 |
command_to_test = "python -m pysr --help"
|
@@ -34,7 +27,7 @@ class TestCli(unittest.TestCase):
|
|
34 |
"",
|
35 |
]
|
36 |
|
37 |
-
expected =
|
38 |
actual = run_command(command_to_test)
|
39 |
self.assertEqual(expected, actual)
|
40 |
|
@@ -56,7 +49,7 @@ class TestCli(unittest.TestCase):
|
|
56 |
"",
|
57 |
]
|
58 |
|
59 |
-
expected =
|
60 |
actual = run_command(command_to_test)
|
61 |
self.assertEqual(expected, actual)
|
62 |
|
|
|
13 |
)
|
14 |
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
class TestCli(unittest.TestCase):
|
17 |
def test_help_on_all_commands(self):
|
18 |
command_to_test = "python -m pysr --help"
|
|
|
27 |
"",
|
28 |
]
|
29 |
|
30 |
+
expected = "\n".join(expected_lines)
|
31 |
actual = run_command(command_to_test)
|
32 |
self.assertEqual(expected, actual)
|
33 |
|
|
|
49 |
"",
|
50 |
]
|
51 |
|
52 |
+
expected = "\n".join(expected_lines)
|
53 |
actual = run_command(command_to_test)
|
54 |
self.assertEqual(expected, actual)
|
55 |
|