diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-05 18:13:53 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-05 18:13:53 +0100 |
| commit | d8b99515b6c5e1e89c232834402c0bbaf5f034d8 (patch) | |
| tree | dec0b9fe9b3b04276c615d5996e66febe644d1ae /minishell_test/__main__.py | |
| parent | b496ff9bb11949a4739ba44c75f2f5504a094fdb (diff) | |
| download | minishell_test-d8b99515b6c5e1e89c232834402c0bbaf5f034d8.tar.gz minishell_test-d8b99515b6c5e1e89c232834402c0bbaf5f034d8.tar.bz2 minishell_test-d8b99515b6c5e1e89c232834402c0bbaf5f034d8.zip | |
Refactoring Suite with custom exception instead of print then exit
Diffstat (limited to 'minishell_test/__main__.py')
| -rwxr-xr-x | minishell_test/__main__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/minishell_test/__main__.py b/minishell_test/__main__.py index 424867c..0b01ba8 100755 --- a/minishell_test/__main__.py +++ b/minishell_test/__main__.py @@ -21,7 +21,7 @@ import subprocess import minishell_test.config as config import minishell_test.sandbox as sandbox from minishell_test.args import parse_args -from minishell_test.suite.suite import Suite +from minishell_test.suite.suite import Suite, SuiteException from minishell_test.suites import * # noqa: F403,F401 @@ -72,7 +72,11 @@ def main(): if config.RANGE is not None or config.CHECK_LEAKS: config.SHOW_RANGE = True - Suite.setup(args.suites) + try: + Suite.setup(args.suites) + except SuiteException as e: + print(e) + sys.exit(1) try: Suite.run_all() except KeyboardInterrupt: |
