Skip to content

Commit

Permalink
Move test dependencies into a requirements.txt
Browse files Browse the repository at this point in the history
Having them as extras misleads some tools into thinking the test
dependencies are optional runtime dependencies. The installation of
pytest-order from GitHub is now also blocked by PyPI.
  • Loading branch information
bwoodsend committed Oct 6, 2024
1 parent ccff374 commit 0a7d2b2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-pgcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
working-directory: /opt/
- run: pip install setuptools wheel
- run: pip install -e .[test]
- run: pip install -e . -r tests/requirements.txt
- run: CC=pgcc ./test
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
architecture: ${{ matrix.architecture }}

- run: pip install -U wheel psutil setuptools
- run: pip install -e .[test]
- run: pip install -e . -r tests/requirements.txt

- name: Show gcc
run: gcc -v
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_alpine
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ RUN apk add gcc musl-dev
ENV FORCE_COLOR=1
COPY . /io
WORKDIR /io
RUN pip install --prefer-binary -e .[test]
RUN pip install --prefer-binary -e . -r tests/requirements.txt
2 changes: 1 addition & 1 deletion Dockerfile_manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COPY README.rst /io/README.rst
# Set the repo's root as the cwd.
WORKDIR /io
# Install more dependencies.
RUN pip install --prefer-binary -e .[test]
RUN pip install --prefer-binary -e . -r tests/requirements.txt
# Work around new metapath nonsense
RUN ln -s /io/cslug /opt/python/cp39-cp39/lib/python3.9/site-packages/cslug
# Copy across this repo.
Expand Down
6 changes: 3 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Vagrant.configure("2") do |config|
machine.vm.provision "shell", privileged: false, inline:<<-END
sudo pkg update
sudo pkg install -y fish py39-pip py39-sqlite3
cd /io && pip install -e .[test] psutil
cd /io && pip install -e . -r tests/requirements.txt psutil
END
setup_shell(machine)
shimify_python(machine, "python3.9")
Expand All @@ -17,7 +17,7 @@ Vagrant.configure("2") do |config|
setup_rsync(machine)
machine.vm.provision "shell", privileged: false, inline:<<-END
sudo pkg_add fish py3-pip
cd /io && pip install -e .[test]
cd /io && pip install -e . -r tests/requirements.txt
END
setup_shell(machine)
shimify_python(machine, "python3")
Expand All @@ -32,7 +32,7 @@ Vagrant.configure("2") do |config|
setup_shell(machine)
shimify_python(machine, "python3.9")
machine.vm.provision "shell", privileged: false, inline:<<-END
cd /io && pip install -e .[test] psutil
cd /io && pip install -e . -r tests/requirements.txt psutil
END
end

Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Test requirements are specified as an extras-require.
Run from the root of this repo:

```shell
pip install -e .[test]
pip install -e . -r tests/requirements.txt
```

Then invoke tests using:
Expand Down

0 comments on commit 0a7d2b2

Please sign in to comment.