Skip to content

Commit 95478d7

Browse files
committed
Now checking for pytest installation
1 parent d9da7df commit 95478d7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎check.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
python -m venv .venv
77
source .venv/bin/activate
88
pip install pytest
9+
10+
NOTE:
11+
If `python -m venv .venv` command does not work, try it with `python3` instead of `python`
912
"""
1013

1114

@@ -16,6 +19,9 @@ def check_for_pytest():
1619
print(
1720
"❌ No `pytest` installed.\nPlease install `pytest` first.\nRun the following commands, one by one:"
1821
)
22+
print("- " * 30)
23+
print(INSTALL_PYTEST_INSTRUCTIONS)
24+
sys.exit(1)
1925

2026

2127
def resolve_exercise_path(query: str) -> Path:
@@ -64,6 +70,8 @@ def filter_for_excercises_only(exercise_path: Path):
6470

6571

6672
def main():
73+
check_for_pytest()
74+
6775
if len(sys.argv) < 2:
6876
print("Usage: python check.py <exercise-folder-or-number>")
6977
sys.exit(1)

0 commit comments

Comments
 (0)