Skip to content

Commit cf179fc

Browse files
put pytest python path into pyproject.toml
1 parent 12a19ac commit cf179fc

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ jobs:
3131
3232
- name: Test with pytest
3333
run: uv run pytest
34-
env:
35-
PYTHONPATH: src/
3634

3735
- name: Minimize uv cache
3836
run: uv cache prune --ci

.run/run pytest.run.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
<module name="eat-api"/>
44
<option name="INTERPRETER_OPTIONS" value=""/>
55
<option name="PARENT_ENVS" value="true"/>
6-
<envs>
7-
<env name="PYTHONPATH" value="src/"/>
8-
</envs>
96
<option name="SDK_HOME" value="$PROJECT_DIR$/venv/bin/python"/>
107
<option name="WORKING_DIRECTORY" value=""/>
118
<option name="IS_MODULE_SDK" value="false"/>

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
1515

1616
COPY . .
1717

18-
ENV PYTHONPATH src/
19-
2018
CMD ["uv run pytest"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,5 @@ This will also be run by CI if you push to the repository.
148148

149149
### Run tests:
150150

151-
- All the tests: `PYTHONPATH=src/ uv run pytest`
152-
- A specific test class: `PYTHONPATH=src/ uv run pytest src/test/test_menu_parser.py::MenuParserTest`
151+
- All the tests: `uv run pytest`
152+
- A specific test class: `uv run pytest src/test/test_menu_parser.py::MenuParserTest`

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ no_implicit_reexport = true
3939
strict_equality = true
4040
pretty = true
4141

42+
[tool.pytest]
43+
ini_options = { pythonpath = "src" }
44+
4245
[tool.ruff]
4346
line-length = 120
4447

0 commit comments

Comments
 (0)