Skip to content

Commit

Permalink
Update dev requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Mar 25, 2021
1 parent 33ed804 commit 66f0702
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 44 deletions.
2 changes: 1 addition & 1 deletion ckan/tests/controllers/test_group.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8

import mock
import unittest.mock as mock
from bs4 import BeautifulSoup
import pytest
import six
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/controllers/test_organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import six
from bs4 import BeautifulSoup
from mock import patch
from unittest.mock import patch

from ckan import model
from ckan.lib.helpers import url_for
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/controllers/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from bs4 import BeautifulSoup
from werkzeug.routing import BuildError
import mock
import unittest.mock as mock

from ckan.lib.helpers import url_for
import pytest
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/controllers/test_user.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# encoding: utf-8
import mock
import unittest.mock as mock
import pytest
import six
from bs4 import BeautifulSoup
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import random
import string
import factory
import mock
import unittest.mock as mock

import ckan.model
import ckan.logic
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from flask.wrappers import Response
from click.testing import CliRunner
import pytest
import mock
import unittest.mock as mock
import rq
import six

Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/legacy/functional/test_group.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# encoding: utf-8

import pytest
import mock
import unittest.mock as mock

import ckan.model as model

Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/logic/action/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import datetime
import mock
import unittest.mock as mock
import pytest

import ckan
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/logic/action/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Unit tests for ckan/logic/action/update.py."""
import datetime

import mock
import unittest.mock as mock
import pytest
import six

Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/logic/auth/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

import mock
import unittest.mock as mock
import pytest
from six import string_types

Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/logic/auth/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Unit tests for ckan/logic/auth/update.py.
"""
import mock
import unittest.mock as mock
import pytest
from six import string_types

Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/logic/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import copy
import decimal
import fractions
import mock
import unittest.mock as mock
import pytest

import ckan.lib.navl.dictization_functions as df
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/test_authz.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# encoding: utf-8

import six
import mock
import unittest.mock as mock
import pytest

from ckan import authz as auth
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datapusher/tests/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import datetime

import mock
import unittest.mock as mock
import pytest
from ckan.logic import _actions

Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/tests/test_db.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8

import mock
import unittest.mock as mock
import pytest
import sqlalchemy.exc

Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/tests/test_dump.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8

import mock
import unittest.mock as mock
import json
import pytest
import six
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8

import mock
import unittest.mock as mock
import pytest

import ckan.plugins as p
Expand Down
2 changes: 1 addition & 1 deletion ckanext/example_idatastorebackend/test/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# encoding: utf-8


from mock import patch, Mock, call
from unittest.mock import patch, Mock, call
import pytest

from ckan.common import config
Expand Down
2 changes: 1 addition & 1 deletion ckanext/example_iuploader/test/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import flask
import pytest
import six
from mock import patch
from unittest.mock import patch
from ckan.lib.helpers import url_for

from six.moves.urllib.parse import urlparse
Expand Down
20 changes: 9 additions & 11 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@

beautifulsoup4==4.9.1
coveralls #Let Unpinned - Requires latest coveralls
docutils==0.12
docutils==0.16
factory-boy==2.12.0
Flask-DebugToolbar==0.11.0
freezegun==0.3.15
ipdb==0.13.2
responses==0.10.14
mock==2.0.0
freezegun==1.1.0
ipdb==0.13.7
responses==0.13.1
pycodestyle==2.5.0
pip-tools==5.1.2
pyfakefs==3.2
Sphinx==1.8.5
sphinx-rtd-theme==0.4.3
cookiecutter==1.7.0
cookiecutter==1.7.2

pytest==4.6.5
pytest==6.2.2
pytest-split-tests==1.0.9
pytest-cov==2.7.1
pytest-freezegun==0.4.1
pytest-rerunfailures==8.0
pytest-cov==2.11.1
pytest-freezegun==0.4.2
pytest-rerunfailures==9.1.1
towncrier==19.2.0
2 changes: 1 addition & 1 deletion doc/contributing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ code will always get another mock object back:

.. code-block:: python
>>> import mock
>>> import unittest.mock as mock
>>> my_mock = mock.MagicMock()
>>> my_mock.foo
<MagicMock name='mock.foo' id='56032400'>
Expand Down
3 changes: 1 addition & 2 deletions doc/maintaining/background-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ synchronously instead of asynchronously:

.. code-block:: python
import mock
import unittest.mock as mock
from ckan.tests import helpers
Expand Down Expand Up @@ -431,4 +431,3 @@ Use that function as follows for enqueuing a job::
compat_enqueue(u'my_extension.echofunction',
ckanext.my_extension.plugin.echo,
[u'Hello World'])

14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ showcontent = true

[tool.black]
line-length = 79

[tool.pytest.ini_options]
filterwarnings = [
"ignore::sqlalchemy.exc.SADeprecationWarning",
"ignore::sqlalchemy.exc.SAWarning",
"ignore::DeprecationWarning"
]
markers = [
"ckan_config: patch configuration used by other fixtures via (key, value) pair.",
"ckan_pytest: test case that is explicitely was rewriten from `nose` style"
]

testpaths = ["ckan", "ckanext"]
addopts = "--strict-markers --pdbcls=IPython.terminal.debugger:TerminalPdb"
11 changes: 0 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,3 @@ previous = true

[upload_sphinx]
upload-dir = build/sphinx/html

[tool:pytest]
filterwarnings =
ignore::sqlalchemy.exc.SADeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::DeprecationWarning
markers =
ckan_config: patch configuration used by other fixtures via (key, value) pair.
ckan_pytest: test case that is explicitely was rewriten from `nose` style
testpaths = ckan ckanext
addopts = --strict-markers --pdbcls=IPython.terminal.debugger:TerminalPdb
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
entry_points=entry_points,
# setup.py test command needs a TestSuite so does not work with py.test
# tests_require=[ 'py >= 0.8.0-alpha2' ]
python_requires=">=3.7",
extras_require=extras_require,
classifiers=[
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit 66f0702

Please sign in to comment.