Tooling
parent
e151511593
commit
63020d9c64
|
|
@ -0,0 +1,3 @@
|
||||||
|
.venv/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import sys
|
||||||
|
|
||||||
|
print("Python Interpreter:")
|
||||||
|
print(sys.executable)
|
||||||
|
|
||||||
|
print("\n.venv -> virtuelle Umgebung aktiv")
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import math
|
||||||
|
|
||||||
|
name = "Max"
|
||||||
|
|
||||||
|
print(nam)
|
||||||
|
|
||||||
|
# terminal -> ruff check . -> ruff check . --fix
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
from src.calculator import add
|
||||||
|
|
||||||
|
print("Manueller Test: ")
|
||||||
|
print(add(2, 3))
|
||||||
|
|
||||||
|
# Terminal -> pytest
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 88
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
testpaths = ["tests"]
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
def multiply(a, b):
|
||||||
|
return a * b
|
||||||
|
|
||||||
|
|
||||||
|
x = [1, 2, 3]
|
||||||
|
print(x)
|
||||||
|
|
||||||
|
#Terminal -> ruff format .
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
from src.calculator import add, subtract
|
||||||
|
|
||||||
|
|
||||||
|
def test_add():
|
||||||
|
assert add(2, 3) == 5
|
||||||
|
|
||||||
|
|
||||||
|
def test_substract():
|
||||||
|
assert subtract(5, 2) == 3
|
||||||
Loading…
Reference in New Issue