Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from nose to pynose #29

Merged
merged 5 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: |
python --version
pip install --upgrade pip wheel
pip install django nose coverage
pip install django pynose coverage
- name: Run coverage
run: |
coverage run -m nose
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO: switch to pytest to support 3.10 (nosetests is broken on 3.10)
python: ['3.9']
django:
- 'Django>=3.2,<3.3'
Expand Down Expand Up @@ -48,7 +47,7 @@ jobs:
run: |
python --version
pip install --upgrade pip wheel
pip install "${{ matrix.django }}" psycopg2-binary nose flake8 coverage
pip install "${{ matrix.django }}" psycopg2-binary pynose flake8 coverage
- name: Run tests
env:
DB_SETTINGS: >-
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Create/activate a python virtualenv and install the required dependencies.
```shell
cd django-field-audit
mkvirtualenv django-field-audit # or however you choose to setup your environment
pip install django nose flake8 coverage
pip install django pynose flake8 coverage
```

### Running tests
Expand All @@ -221,7 +221,7 @@ your local Python's `sqlite3` library ships with the `JSON1` extension enabled

- Tests
```shell
nosetests
pynose
gherceg marked this conversation as resolved.
Show resolved Hide resolved
```

- Style check
Expand Down
2 changes: 1 addition & 1 deletion field_audit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def get_delta_from_instance(cls, instance, is_create, is_delete):
:returns: {field_name: {'old': old_value, 'new': new_value}, ...}
:raises: ``AssertionError`` if both is_create and is_delete are true
"""
assert not (is_create and is_delete),\
assert not (is_create and is_delete), \
"is_create and is_delete cannot both be true"
fields_to_audit = cls.field_names(instance)
# SIDE EFFECT: fetch and reset initial values for next db write
Expand Down
Loading