generated from daniil-berg/boilerplate-py
Daniil Fajnberg
25cbe8de4b
➖ remove `flake8` dependency (replaced by `ruff`);
change `lint.sh` script to use `isort`, `ruff`, and `black`
13 lines
382 B
Python
13 lines
382 B
Python
import sys
|
|
import unittest
|
|
|
|
if __name__ == "__main__":
|
|
try:
|
|
pattern = sys.argv[1]
|
|
except IndexError:
|
|
pattern = "test*.py"
|
|
test_suite = unittest.defaultTestLoader.discover(".", pattern=pattern)
|
|
test_runner = unittest.TextTestRunner(resultclass=unittest.TextTestResult)
|
|
result = test_runner.run(test_suite)
|
|
sys.exit(not result.wasSuccessful())
|