diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000000000000000000000000000000000..6a22d633393bf2550fcc08f96ba50f7d1e8ecfe1 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,6 @@ +[pytest] +addopts = -v --cache-clear -rf --cov=src/app --cov-report=term --cov-report=html --maxfail=10 +console_output_style = count +python_classes = Test* +python_functions = test_* +testpaths = tests \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..2a9f4570fd77cd765299b058c572f5c0ff2ddb04 Binary files /dev/null and b/requirements.txt differ diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1afb6e3b3e25bd98d80992c523a99a6462198406 --- /dev/null +++ b/src/__init__.py @@ -0,0 +1 @@ +from .app import * diff --git a/src/app/__init__.py b/src/app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/utils/__init__.py b/src/app/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fb74b20a2530d21456f084269070a6811128bbe0 --- /dev/null +++ b/src/app/utils/__init__.py @@ -0,0 +1 @@ +from .mymath import * diff --git a/src/app/utils/mymath/__init__.py b/src/app/utils/mymath/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/utils/mymath/addition.py b/src/app/utils/mymath/addition.py new file mode 100644 index 0000000000000000000000000000000000000000..a840d525520d131d632425a1dce70cbb2ec47371 --- /dev/null +++ b/src/app/utils/mymath/addition.py @@ -0,0 +1,4 @@ +class Math: + @staticmethod + def add(x: float, y: float) -> float: + return x + y \ No newline at end of file diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000000000000000000000000000000000000..738211830aa7416cd605c8a4b66a80a3a343b714 --- /dev/null +++ b/src/main.py @@ -0,0 +1,10 @@ +import src.app.utils.mymath.addition as addition + + +def main(): + print("Hello, World!") + + +if __name__ == "__main__": + main() + print(addition.Math.add(1, 2)) diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..90f60fdd89ad8575faafe45188bd1d968852fc67 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ +from .utils import * \ No newline at end of file diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6246e3e8c48c320a8f5de0ed4a012ac637748f0f --- /dev/null +++ b/tests/utils/__init__.py @@ -0,0 +1 @@ +from .mymath import * \ No newline at end of file diff --git a/tests/utils/mymath/__init__.py b/tests/utils/mymath/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tests/utils/mymath/test_addition.py b/tests/utils/mymath/test_addition.py new file mode 100644 index 0000000000000000000000000000000000000000..fb250be44d06bb0bfc3aeaadd4f87320b70b2a88 --- /dev/null +++ b/tests/utils/mymath/test_addition.py @@ -0,0 +1,6 @@ +import src.app.utils.mymath.addition as addition + + +class TestMath: + def test_normal_scenario_1(self): + assert addition.Math.add(1, 2) == 3