Skip to content

Commit

Permalink
Use built-in unittest.mock and remove unneeded case dep
Browse files Browse the repository at this point in the history
Use the built-in unittest.mock module to implement mocks since Python 2
is no longer supported.  Remove unused fixtures, and effectively
the dependency on case package.

It seems that this package has been pulling six implicitly for
sphinx_celery, so add the transitional dep for the time being.
See celery/sphinx_celery#11.
  • Loading branch information
mgorny committed Apr 1, 2021
1 parent 63ba62d commit a480dba
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 25 deletions.
1 change: 1 addition & 0 deletions requirements/docs.txt
@@ -1 +1,2 @@
sphinx_celery>=1.1
six # missing dependency in sphinx_celery
1 change: 0 additions & 1 deletion requirements/test.txt
@@ -1,2 +1 @@
case>=1.3.1
pytest>=3.0
20 changes: 0 additions & 20 deletions t/unit/conftest.py

This file was deleted.

2 changes: 1 addition & 1 deletion t/unit/test_funtools.py
@@ -1,6 +1,6 @@
import pytest

from case import Mock
from unittest.mock import Mock

from vine.abstract import Thenable
from vine.funtools import (
Expand Down
3 changes: 1 addition & 2 deletions t/unit/test_promises.py
Expand Up @@ -4,10 +4,9 @@

from collections import deque
from struct import pack, unpack
from unittest.mock import Mock
import weakref

from case import Mock

from vine.funtools import wrap
from vine.promises import promise

Expand Down
2 changes: 1 addition & 1 deletion t/unit/test_synchronization.py
@@ -1,6 +1,6 @@
import pytest

from case import Mock
from unittest.mock import Mock

from vine.promises import promise
from vine.synchronization import barrier
Expand Down

0 comments on commit a480dba

Please sign in to comment.