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

python3Packages.mocket: Resolve test failures #216511

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion pkgs/development/python-modules/geoip2/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ buildPythonPackage, lib, fetchPypi, pythonOlder
{ buildPythonPackage, lib, fetchPypi, pythonOlder, pythonAtLeast
, aiohttp
, maxminddb
, mocket
Expand Down Expand Up @@ -30,6 +30,8 @@ buildPythonPackage rec {
pytestCheckHook
];

disabledTests = lib.optional (pythonAtLeast "3.11") "TestAsyncClient";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me there was also a failure on Python 3.10, see e2be015


pythonImportsCheck = [ "geoip2" ];

meta = with lib; {
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/python-modules/mocket/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
, buildPythonPackage
, fetchPypi
, pythonOlder
, pythonAtLeast
, isPy3k
, decorator
, http-parser
, python-magic
, urllib3
, pytestCheckHook
, pytest-asyncio
, pytest-mock
, aiohttp
, fastapi
Expand Down Expand Up @@ -38,6 +40,7 @@ buildPythonPackage rec {

nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
pytest-mock
aiohttp
fastapi
Expand All @@ -54,6 +57,10 @@ buildPythonPackage rec {
pytestFlagsArray = [
# Requires a live Redis instance
"--ignore=tests/main/test_redis.py"
] ++ lib.optionals (pythonAtLeast "3.11") [
# Do not work with newer versions of pytest-asyncio
"--ignore=tests/main/test_http_aiohttp.py"
"--ignore=tests/tests38/test_http_aiohttp.py"
] ++ lib.optionals (pythonOlder "3.8") [
# Uses IsolatedAsyncioTestCase which is only available >= 3.8
"--ignore=tests/tests38/test_http_aiohttp.py"
Expand Down