Skip to content

Commit

Permalink
Feat/add pytest tests (#4)
Browse files Browse the repository at this point in the history
* feat: add system check
  • Loading branch information
andreasbaumgartner authored Apr 24, 2024
1 parent 12c99dc commit 7f7282b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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"

0 comments on commit 7f7282b

Please sign in to comment.