test(student-tests): lab2 consolidate negative, concurrency, auth and resilience checks in one commit
This commit is contained in:
@@ -5,14 +5,20 @@ from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
|
||||
QUICK = ('test_cases.py', 'test_concurrency.py', 'test_auth.py')
|
||||
|
||||
|
||||
def main():
|
||||
args = sys.argv[1:]
|
||||
for script in ('test_cases.py', 'test_concurrency.py'):
|
||||
failed = []
|
||||
for script in QUICK:
|
||||
print(f'=== {script} ===')
|
||||
result = subprocess.run([sys.executable, str(ROOT / script), *args])
|
||||
if result.returncode != 0:
|
||||
sys.exit(result.returncode)
|
||||
failed.append(script)
|
||||
if failed:
|
||||
print('FAILED:', ', '.join(failed))
|
||||
sys.exit(1)
|
||||
print('=== Все тесты прошли ===')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user