Skip to content

Commit

Permalink
Switch to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
audiodude committed Oct 4, 2023
1 parent 525b822 commit 82ced14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
services:
# Unit test rely on a local MySQL instance with an empty root password.
mysql:
image: mysql:5.7
image: mysql:8.0.30
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
Expand Down Expand Up @@ -51,9 +51,9 @@ jobs:
cp wp1/credentials.py.e2e wp1/credentials.py
cp wp1/credentials.py.dev.e2e wp1/credentials.py.dev
- name: Test with nose
- name: Test with pytest, with coverage
run: |
nosetests --with-coverage
pytest --cov
- name: Upload to Codecov
uses: codecov/codecov-action@v3
Expand Down
9 changes: 6 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ gunicorn==19.9.0
identify==1.4.6
idna==2.8
importlib-metadata==5.2.0
iniconfig==2.0.0
isodate==0.6.1
itsdangerous==2.1.2
Jinja2==3.1.2
Expand All @@ -44,19 +45,20 @@ mwclient==0.9.3
mwoauth==0.3.8
mwparserfromhell==0.5.2
nodeenv==1.3.3
nose==1.3.7
nose-cprof==0.2.1
oauthlib==2.1.0
packaging==21.3
pathspec==0.11.2
platformdirs==2.6.2
pluggy==1.3.0
pre-commit==2.21.0
PyJWT==2.4.0
PyMySQL==0.9.3
pyparsing==3.0.9
pytest==7.4.2
pytest-cov==4.1.0
python-dateutil==2.8.2
pytz==2022.7.1
PyYAML==5.4.1
PyYAML==6.0.1
pyyaml_env_tag==0.1
rdflib==6.2.0
redis==4.4.4
Expand All @@ -65,6 +67,7 @@ requests-oauthlib==1.0.0
rq==1.13.0
rq-scheduler==0.13.0
s3transfer==0.4.2
setuptools==68.2.2
six==1.16.0
sortedcontainers==2.4.0
sqlparse==0.4.4
Expand Down
2 changes: 1 addition & 1 deletion wp1/credentials.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ from wp1.environment import Environment

# yapf: disable
# Comment the following line in production systems.
ENV = Environment.TEST if 'nose' in sys.modules.keys() else Environment.DEVELOPMENT
ENV = Environment.TEST if 'pytest' in sys.modules else Environment.DEVELOPMENT
# yapf: enable

# The directory under conf/ to look for the conf.json file in. So if this is
Expand Down

0 comments on commit 82ced14

Please sign in to comment.