@@ -1,10 +1,11 @@
1−{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy27
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, pythonOlder
5+, isPy3k
26, decorator
37, http-parser
4−, importlib-metadata
5−, python
68, python_magic
7−, six
89, urllib3
910, pytestCheckHook
1011, pytest-mock
@@ -13,15 +14,17 @@
1314, redis
1415, requests
1516, sure
17+, pook
1618}:
1719
1820buildPythonPackage rec {
1921 pname = "mocket";
2022 version = "3.9.40";
23+ disabled = !isPy3k;
2124
2225 src = fetchPypi {
2326 inherit pname version;
24− sha256 = "dbe4349a0ed30ed0c5d04684dd5d98517f8d1e4585fe0da4832747e2f01f3c18";
27+ sha256 = "061w3zqf4ir7hfj0vzl58lg8szsik1fxv126s32x03nk1sd39r6v";
2528 };
2629
2730 propagatedBuildInputs = [
@@ -29,8 +32,7 @@ buildPythonPackage rec {
2932 http-parser
3033 python_magic
3134 urllib3
32− six
33− ] ++ lib.optionals (isPy27) [ six ];
35+ ];
3436
3537 checkInputs = [
3638 pytestCheckHook
@@ -40,13 +42,14 @@ buildPythonPackage rec {
4042 redis
4143 requests
4244 sure
45+ pook
4346 ];
4447
4548 pytestFlagsArray = [
46− "--ignore=tests/main/test_pook.py" # pook is not packaged
47− "--ignore=tests/main/test_redis.py" # requires a live redis instance
49+ # Requires a live Redis instance
50+ "--ignore=tests/main/test_redis.py"
4851 ] ++ lib.optionals (pythonOlder "3.8") [
49− # uses IsolatedAsyncioTestCase which is only available >= 3.8
52+ # Uses IsolatedAsyncioTestCase which is only available >= 3.8
5053 "--ignore=tests/tests38/test_http_aiohttp.py"
5154 ];
5255
@@ -61,6 +64,7 @@ buildPythonPackage rec {
6164 "test_truesendall_with_recording_https"
6265 "test_truesendall_after_mocket_session"
6366 "test_real_request_session"
67+ "test_asyncio_record_replay"
6468 ];
6569
6670 pythonImportsCheck = [ "mocket" ];