diff options
| author | Timothy Crosley <timothy.crosley@gmail.com> | 2021-03-01 00:12:35 -0800 |
|---|---|---|
| committer | Timothy Crosley <timothy.crosley@gmail.com> | 2021-03-01 00:12:35 -0800 |
| commit | 3de261f784dfea5729a06c6d8a4dddf82a715caa (patch) | |
| tree | 155a807d983028cefd8180f08442c9024b175f2d /tests/unit/test_main.py | |
| parent | 747a08c280028fea66ff6ab8463e7fb05527e8d8 (diff) | |
| download | isort-3de261f784dfea5729a06c6d8a4dddf82a715caa.tar.gz | |
Add test for allowing root, switch to allow root command
Diffstat (limited to 'tests/unit/test_main.py')
| -rw-r--r-- | tests/unit/test_main.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index 9a78cbad..133a9488 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -145,6 +145,11 @@ sections=MADEUP main.main([str(python_file)]) +def test_ran_against_root(): + with pytest.raises(SystemExit): + main.main(["/"]) + + def test_main(capsys, tmpdir): base_args = [ "-sp", |
