diff --git a/tests/integration/models/reddit/test_subreddit.py b/tests/integration/models/reddit/test_subreddit.py index 75bd348c..64d08a1a 100644 --- a/tests/integration/models/reddit/test_subreddit.py +++ b/tests/integration/models/reddit/test_subreddit.py @@ -2,7 +2,6 @@ import socket import sys from asyncio import TimeoutError -from unittest.mock import AsyncMock, MagicMock import aiofiles import pytest @@ -11,9 +10,11 @@ from asyncprawcore import BadRequest, Forbidden, NotFound, TooLarge if sys.version_info < (3, 8): - from asynctest import mock + from asynctest import CoroutineMock as AsyncMock + from asynctest import MagicMock, mock else: from unittest import mock + from unittest.mock import AsyncMock, MagicMock from asyncpraw.const import PNG_HEADER from asyncpraw.exceptions import ( diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index 218fc218..f7283f7a 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -1,5 +1,6 @@ import os import sys +from pathlib import Path import pytest @@ -24,13 +25,13 @@ def _assert_config_read(environment, mock_config): del os.environ[env_name] os.environ[environment] = "/MOCK" - module_dir = os.path.dirname(sys.modules["asyncpraw"].__file__) - environ_path = os.path.join( - "/MOCK", ".config" if environment == "HOME" else "", "praw.ini" + module_dir = Path(sys.modules["asyncpraw"].__file__).parent + environ_path = ( + Path("/MOCK") / (".config" if environment == "HOME" else "") / "praw.ini" ) locations = [ - os.path.join(module_dir, "praw.ini"), - environ_path, + str(module_dir / "praw.ini"), + str(environ_path), "praw.ini", ] diff --git a/tox.ini b/tox.ini index 2d4ac920..ab6d35c7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,9 @@ [tox] -envlist = py37,py38,py39,py310 -skip_missing_interpreters = false +envlist = py37,py38,py39,py310,py311 +skipsdist = true [testenv] +deps = + .[test] commands = pytest -extras = dev