aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_main.py
diff options
context:
space:
mode:
authorGravatar Mark <[email protected]>2022-06-04 12:49:47 -0700
committerGravatar GitHub <[email protected]>2022-06-04 12:49:47 -0700
commit2759fd453f5977f027a10cc672fed630ecc7de6c (patch)
treeecaa6114606415e3b95ba707661d70a1cb87fd90 /tests/test_main.py
parentMerge pull request #143 from python-discord/feat/tests/wsgi-app-from-cfg (diff)
parentCI: use GH's Ubuntu 22.04 runner instead of the self-hosted one (diff)
Merge #144 - add black and isort
Diffstat (limited to 'tests/test_main.py')
-rw-r--r--tests/test_main.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/test_main.py b/tests/test_main.py
index 5b5bfcb..77b3130 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -12,30 +12,24 @@ import snekbox.__main__ as snekbox_main
class ArgParseTests(unittest.TestCase):
def test_parse_args(self):
subtests = (
- (
- ["", "code"],
- Namespace(code="code", nsjail_args=[], py_args=["-c"])
- ),
+ (["", "code"], Namespace(code="code", nsjail_args=[], py_args=["-c"])),
(
["", "code", "--time_limit", "0"],
- Namespace(code="code", nsjail_args=["--time_limit", "0"], py_args=["-c"])
+ Namespace(code="code", nsjail_args=["--time_limit", "0"], py_args=["-c"]),
),
(
["", "code", "---", "-m", "timeit"],
- Namespace(code="code", nsjail_args=[], py_args=["-m", "timeit"])
+ Namespace(code="code", nsjail_args=[], py_args=["-m", "timeit"]),
),
(
["", "code", "--time_limit", "0", "---", "-m", "timeit"],
- Namespace(code="code", nsjail_args=["--time_limit", "0"], py_args=["-m", "timeit"])
+ Namespace(code="code", nsjail_args=["--time_limit", "0"], py_args=["-m", "timeit"]),
),
(
["", "code", "--time_limit", "0", "---"],
- Namespace(code="code", nsjail_args=["--time_limit", "0"], py_args=[])
+ Namespace(code="code", nsjail_args=["--time_limit", "0"], py_args=[]),
),
- (
- ["", "code", "---"],
- Namespace(code="code", nsjail_args=[], py_args=[])
- )
+ (["", "code", "---"], Namespace(code="code", nsjail_args=[], py_args=[])),
)
for argv, expected in subtests: