Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add pytest tests #4

Merged
merged 9 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==8.1.1
13 changes: 8 additions & 5 deletions src/check_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,28 @@ def check_os_system(self):
"""check operating system"""
if platform != "linux":
print("Only Linux is supported")
return sys.exit(1)
sys.exit(1)


def check_python_installed(self):
"""check if python is installed"""
if os.system("python3 --version") != 0:
print("Python is not installed")
return sys.exit(1)
sys.exit(1)


def check_python_version(self):
"""check python version"""
if os.system("python3 --version") >= 3.10:
print("Please use Python 3.10 or higher")
return sys.exit(1)
sys.exit(1)


def check_git_installed(self):
"""check if git is installed"""
if os.system("git --version") != 0:
print("Git is not installed")
return sys.exit(1)
sys.exit(1)

def __str__(self):
return "SystemCheck class"
return "SystemCheck Class"
Loading