about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/mocket/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/mocket/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/mocket/default.nix26
1 files changed, 15 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/mocket/default.nix b/nixpkgs/pkgs/development/python-modules/mocket/default.nix
index 2102718ab6ef..76b64be7430b 100644
--- a/nixpkgs/pkgs/development/python-modules/mocket/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/mocket/default.nix
@@ -1,10 +1,11 @@
-{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy27
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, isPy3k
 , decorator
 , http-parser
-, importlib-metadata
-, python
 , python_magic
-, six
 , urllib3
 , pytestCheckHook
 , pytest-mock
@@ -13,15 +14,17 @@
 , redis
 , requests
 , sure
+, pook
 }:
 
 buildPythonPackage rec {
   pname = "mocket";
-  version = "3.9.39";
+  version = "3.9.40";
+  disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1mbcgfy1vfwwzn54vkq8xmfzdyc28brfpqk4d55r3a6abwwsn6a4";
+    sha256 = "061w3zqf4ir7hfj0vzl58lg8szsik1fxv126s32x03nk1sd39r6v";
   };
 
   propagatedBuildInputs = [
@@ -29,8 +32,7 @@ buildPythonPackage rec {
     http-parser
     python_magic
     urllib3
-    six
-  ] ++ lib.optionals (isPy27) [ six ];
+  ];
 
   checkInputs = [
     pytestCheckHook
@@ -40,13 +42,14 @@ buildPythonPackage rec {
     redis
     requests
     sure
+    pook
   ];
 
   pytestFlagsArray = [
-    "--ignore=tests/main/test_pook.py" # pook is not packaged
-    "--ignore=tests/main/test_redis.py" # requires a live redis instance
+    # Requires a live Redis instance
+    "--ignore=tests/main/test_redis.py"
   ] ++ lib.optionals (pythonOlder "3.8") [
-    # uses IsolatedAsyncioTestCase which is only available >= 3.8
+    # Uses IsolatedAsyncioTestCase which is only available >= 3.8
     "--ignore=tests/tests38/test_http_aiohttp.py"
   ];
 
@@ -61,6 +64,7 @@ buildPythonPackage rec {
     "test_truesendall_with_recording_https"
     "test_truesendall_after_mocket_session"
     "test_real_request_session"
+    "test_asyncio_record_replay"
   ];
 
   pythonImportsCheck = [ "mocket" ];