Skip to content

Commit 1afdad5

Browse files
committed
docs: update local-dev test instructions from nosetests to pytest
The Jenkins/Py2-era testing section referenced nosetests-2.7 and a ckan-nosetests alias that no longer exist. adx test wraps ckan-pytest (pytest in CKAN's venv); update the core-tests command to the pytest equivalent against the mounted /etc/ckan/test-core.ini. Also drop the dead nosetests.xml entry from .gitignore.
1 parent 6ecce97 commit 1afdad5

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ htmlcov/
4141
.coverage
4242
.coverage.*
4343
.cache
44-
nosetests.xml
4544
coverage.xml
4645
*.cover
4746
.hypothesis/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ To create and setup the test databases:
165165
adx testsetup
166166
```
167167
168-
Tests should be run with the version of nosetests-2.7 installed in CKAN's virtual environment. There is an alias set up inside the docker container called "ckan-nosetests" that points to this executable.
168+
Extensions are tested with pytest. The `adx test` command wraps `ckan-pytest` (an alias inside the container pointing to pytest in CKAN's virtual environment) and runs it against the extension's `test.ini`:
169169
170170
```shell
171171
adx test extension_name
@@ -177,16 +177,16 @@ e.g.
177177
adx test restricted
178178
```
179179
180-
To run specific test case you can you -k pytest arg:
180+
To run a specific test case you can use pytest's -k arg:
181181

182182
```shell
183183
adx test restricted -k test_regression_example
184184
```
185185

186-
To run the ckan core tests:
186+
To run the ckan core tests against the mounted `test-core.ini`:
187187

188188
```shell
189-
docker exec -it ckan ckan-nosetests --ckan --with-pylons=/usr/lib/ckan/venv/src/ckan/test-core.ini ckan ckanext
189+
docker exec -it ckan ckan-pytest --ckan-ini=/etc/ckan/test-core.ini --pyargs ckan
190190
```
191191

192192
## Debugging with ipdb

0 commit comments

Comments
 (0)