From 5875931cd0b3a09d192561edcc8a9b4d74a6296e Mon Sep 17 00:00:00 2001 From: Sinia Gubser Date: Mon, 9 Mar 2026 12:13:00 +0100 Subject: [PATCH] feat: add addition function and its test-function --- .gitignore | 0 .pre-commit-config.yaml | 18 ++++++++++++++++++ pyproject.toml | 0 requirements.txt | 0 src/__init__.py | 0 src/moduleA.py | 10 ++++++++++ .../test_moduleA.cpython-313-pytest-9.0.2.pyc | Bin 0 -> 2109 bytes tests/test_moduleA.py | 6 ++++++ 8 files changed, 34 insertions(+) create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml create mode 100644 requirements.txt create mode 100644 src/__init__.py create mode 100644 src/moduleA.py create mode 100644 tests/__pycache__/test_moduleA.cpython-313-pytest-9.0.2.pyc create mode 100644 tests/test_moduleA.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..dd9c259 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.0 + hooks: + - id: ruff + + - repo: https://github.com/psf/black + rev: stable + hooks: + - id: black diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/moduleA.py b/src/moduleA.py new file mode 100644 index 0000000..b7f0906 --- /dev/null +++ b/src/moduleA.py @@ -0,0 +1,10 @@ +def addition(a=1, b=2): + return a + b + + +def f(x: int, y: int) -> int: + return x + y + + +if __name__ == "__main__": + print(addition(5, 5)) diff --git a/tests/__pycache__/test_moduleA.cpython-313-pytest-9.0.2.pyc b/tests/__pycache__/test_moduleA.cpython-313-pytest-9.0.2.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c1a56f1d332eb2307ff0d8e73bbe8f6bdfca0724 GIT binary patch literal 2109 zcmd@VO=}ZDbY^#xY?8KGtDw0wMhjig(AK11nre}Pv{0o>q>#e0ZMHSA-HkJ;wH3jG zhe|yZLFhjaFa8LBfo&<3MfBjQ;6cdElW%5sHXEs^XP3?U{+jpRPMV#aDFn}}H}7f= z;IE7kj}#Ei0U%x@9qD)m5zMhPEmJ9rrWF#)GL1A7pH7ej&~gS5bp>n6F>{~Qu&0{U zYOPUoouwckM=C%We$CGSU!w{Z%3?q`kk36`#^ZMoa&!HGwE7;Qil_|DDZ;CTb5KoL zDqvln#|5bvSm;V6E^Ovl?q8l95_zwKrrO(1oZXT2xSlA>1DJD4<&-EV66>^(wQvrV6%k8d3$~zy z9r)ER>MBf1b)?n==cQtB4kxB3U8@}DGh7$_seWtg&+lfKfElLd@Bha$ltjNH6FPY> zVt;KJ7nXWDALE;#>K%G#Sq=6g`44-M6tM(u?S&)3e#Bru9<3m)YxbCZ>Kgtbl}Z}k z)cX4C8$%jRJqd_xDa)t>47eCcKn%j}2o|@%z%T=2o2Mda2L~aqQr`fa z#*KBJtU*GWJLGLa@1U7Yw;97l#KBarM$3G~U-EIzE+&oe;{=2Vaw#Gxw zCk~a&%h6D_*Wy4Sj1O3_&?Y26{PFC$4@&ROLjW&FcP6(dfY_bmU@zT!qy+E2(z`Vg zaz1g$TteAiivz{Zq^~$&u|raX0O{^r=ouv-aT6MWw4|qs#UVW)@Gcnss^$G@!}#;W zS|_yztW7BL5`m0#GoLgiOZlMRd|?Ue^jk#w0Fg_~M7`nbC&(3G*}ob+1K_)iG5&(k Ob99KZO+~_4?(-AF4UOmk literal 0 HcmV?d00001 diff --git a/tests/test_moduleA.py b/tests/test_moduleA.py new file mode 100644 index 0000000..42fe6cc --- /dev/null +++ b/tests/test_moduleA.py @@ -0,0 +1,6 @@ +from src.moduleA import addition + + +def test_a(): + assert addition() == 3 + assert addition(5, 5) == 10