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

Use pytest instead of deprecated nose #153

Merged
merged 5 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ docs: setup_docs build_docs
python -mwebbrowser file:///`pwd`/docs/_build/html/index.html

test: setup
nosetests
pytest

publish: setup_publish
python setup.py sdist
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def readme():
'coverage',
'moto[server]',
'mock',
'nose',
'pytest',
],
},
)
5 changes: 2 additions & 3 deletions tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from datetime import datetime, timedelta
from unittest import TestCase
from pytest import raises

from dateutil.tz import tzutc
from nose.tools import assert_raises_regexp
from thumbor.config import Config
from thumbor.context import Context, RequestParameters
from tornado.testing import gen_test
Expand Down Expand Up @@ -101,8 +101,7 @@ async def test_should_raise_on_invalid_config(self):

await storage.put(IMAGE_URL % '9999', IMAGE_BYTES)

with assert_raises_regexp(RuntimeError,
"STORES_CRYPTO_KEY_FOR_EACH_IMAGE can't be True if no SECURITY_KEY specified"):
with raises(RuntimeError, match='STORES_CRYPTO_KEY_FOR_EACH_IMAGE can\'t be True if no SECURITY_KEY specified'):
await storage.put_crypto(IMAGE_URL % '9999')

@gen_test
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2
4.0b
Bladrak marked this conversation as resolved.
Show resolved Hide resolved