Skip to content

Commit

Permalink
Set shell param to False while running code style tests
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Jul 24, 2024
1 parent fe35a34 commit 594baf5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_codestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download.

import subprocess
import sys
import unittest

import pytest


@pytest.mark.skipif(sys.platform == "darwin", reason="Test does not run on macOS13 and older.")
class BaseTests(unittest.TestCase):
def test_codestyle(self):
args = "black --check -l 100 setup.py src tests"
try:
subprocess.check_output(args.split())
subprocess.check_output(args.split(), shell=False)
except subprocess.CalledProcessError as e:
print("===========================================================")
print(e.output)
Expand All @@ -25,7 +29,7 @@ def test_codestyle(self):

args = "isort --check-only src tests setup.py"
try:
subprocess.check_output(args.split())
subprocess.check_output(args.split(), shell=False)
except Exception as e:
print("===========================================================")
print(e.output)
Expand Down

0 comments on commit 594baf5

Please sign in to comment.