diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-05 01:38:33 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-05 01:38:33 +0100 |
| commit | a3e983f78dc4cbcf6f75f78fa2b3c57e09cd1b2b (patch) | |
| tree | 41e580d778fce9baa00dd3850b8cf79b9ac820e9 /src/suites | |
| parent | e3fd7b2f1de32dfedce03470571f383b407096cb (diff) | |
| download | minishell_test-a3e983f78dc4cbcf6f75f78fa2b3c57e09cd1b2b.tar.gz minishell_test-a3e983f78dc4cbcf6f75f78fa2b3c57e09cd1b2b.tar.bz2 minishell_test-a3e983f78dc4cbcf6f75f78fa2b3c57e09cd1b2b.zip | |
Added a few flake8 plugin
Diffstat (limited to 'src/suites')
| -rw-r--r-- | src/suites/cmd.py | 8 | ||||
| -rw-r--r-- | src/suites/path.py | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/suites/cmd.py b/src/suites/cmd.py index 19dd698..53b1f97 100644 --- a/src/suites/cmd.py +++ b/src/suites/cmd.py @@ -6,7 +6,7 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 15:11:46 by charles #+# #+# # -# Updated: 2020/10/15 10:40:11 by cacharle ### ########.fr # +# Updated: 2021/02/04 16:14:54 by charles ### ########.fr # # # # ############################################################################ # @@ -127,7 +127,13 @@ def suite_status(test): def suite_cmd_path(test): """ cmd is a relative path, permissions on executable """ ls_path = distutils.spawn.find_executable("ls") + if ls_path is None: + print("Couldn't find `ls` in your PATH: Skipping suite") + return cat_path = distutils.spawn.find_executable("cat") + if cat_path is None: + print("Couldn't find `cat` in your PATH: Skipping suite") + return test(ls_path, setup="touch a b c") test(ls_path + " -l", setup="touch a b c") test("./bonjour", setup="touch a b c; cp {} bonjour".format(ls_path)) diff --git a/src/suites/path.py b/src/suites/path.py index 5db1e36..93d4232 100644 --- a/src/suites/path.py +++ b/src/suites/path.py @@ -6,7 +6,7 @@ # By: charles <me@cacharle.xyz> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/09/09 15:12:58 by charles #+# #+# # -# Updated: 2020/10/15 09:17:09 by cacharle ### ########.fr # +# Updated: 2021/02/04 16:14:20 by charles ### ########.fr # # # # ############################################################################ # @@ -19,6 +19,9 @@ from suite import suite def suite_path(test): """ searching a command in the path tests """ whoami_path = distutils.spawn.find_executable("which") + if whoami_path is None: + print("Couldn't find `whoami` in your PATH: Skipping suite") + return mode_fmt = ("mkdir path && cp " + whoami_path + " ./path/a && chmod {} ./path/a") |
