Skip to content

Commit 22973ae

Browse files
committed
chore: Fix pre-commit-hooks
1 parent 2398b39 commit 22973ae

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ module = [
6565
"shapely",
6666
"shapely.*",
6767
"yaml",
68+
"buggy_script.*",
6869
]
6970

7071
[tool.pytest.ini_options]
7172
minversion = "6.0"
7273
addopts = ["-p no:warnings", "--import-mode=importlib"]
7374
xfail_strict = true
7475
log_cli_level = "warn"
75-
pythonpath = "sp26_gke"
76+
pythonpath = ["sp26_gke", "tests"]
7677
testpaths = ["tests"]
7778

7879
[tool.coverage.run]

tests/buggy_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
def add(a, b):
2-
return a - b
2+
return a + b

tests/test_buggy_script.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
import sys
2-
3-
sys.path.append("/tests")
4-
5-
from buggy_script import add # type: ignore[import-not-found]
1+
from buggy_script import add
62

73

84
def test_add():
95
assert add(2, 3) == 5
10-
11-
12-
test_add()
13-
print("PASSED")

0 commit comments

Comments
 (0)