From a705dca58f5aebc65beb95ae5cf38b0cf27dbde5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 4 Dec 2022 14:09:57 +0100 Subject: [PATCH] python3Packages.twisted: disable failing tests on aarch64-darwin They all fail for the same reason: ``` [ERROR] Traceback (most recent call last): File "/nix/store/xz6krlmwsc15z96p7hgcvssmx848hvq0-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/internet/test/test_posixbase.py", line 55, in tearDown self.assertEqual( File "/nix/store/xz6krlmwsc15z96p7hgcvssmx848hvq0-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/trial/_synctest.py", line 441, in assertEqual super().assertEqual(first, second, msg) File "/nix/store/70c1n7i4c90dn4iys0myy30yfxmlsza7-python3-3.10.8/lib/python3.10/unittest/case.py", line 845, in assertEqual assertion_func(first, second, msg=msg) File "/nix/store/70c1n7i4c90dn4iys0myy30yfxmlsza7-python3-3.10.8/lib/python3.10/unittest/case.py", line 838, in _baseAssertEqual raise self.failureException(msg) twisted.trial.unittest.FailTest: 3 != 0 : Warnings found at the end of the test: [{'message': 'unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>', 'category': , 'filename': '/nix/store/70c1n7i4c90dn4iys0myy30yfxmlsza7-python3-3.10.8/lib/python3.10/asyncio/base_events.py', 'lineno': 688}, {'message': 'unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>', 'category': , 'filename': '/nix/store/70c1n7i4c90dn4iys0myy30yfxmlsza7-python3-3.10.8/lib/python3.10/asyncio/base_events.py', 'lineno': 688}, {'message': 'unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>', 'category': , 'filename': '/nix/store/70c1n7i4c90dn4iys0myy30yfxmlsza7-python3-3.10.8/lib/python3.10/asyncio/base_events.py', 'lineno': 688}] twisted.internet.test.test_posixbase.PosixReactorBaseTests.test_removeAllSkipsInternalReaders ``` --- pkgs/development/python-modules/twisted/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index 9b0f39e050e2..86e009d55c40 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -109,6 +109,11 @@ buildPythonPackage rec { '' + lib.optionalString (stdenv.isAarch64 && stdenv.isDarwin) '' echo 'AbortConnectionTests_AsyncioSelectorReactorTests.test_fullWriteBufferAfterByteExchange.skip = "Timeout after 120 seconds"' >> src/twisted/internet/test/test_tcp.py echo 'AbortConnectionTests_AsyncioSelectorReactorTests.test_resumeProducingAbort.skip = "Timeout after 120 seconds"' >> src/twisted/internet/test/test_tcp.py + + echo 'PosixReactorBaseTests.test_removeAllSkipsInternalReaders.skip = "Fails due to unclosed event loop"' >> src/twisted/internet/test/test_posixbase.py + echo 'PosixReactorBaseTests.test_wakerIsInternalReader.skip = "Fails due to unclosed event loop"' >> src/twisted/internet/test/test_posixbase.py + + echo 'TCPPortTests.test_connectionLostFailed.skip = "Fails due to unclosed event loop"' >> src/twisted/internet/test/test_posixbase.py ''; # Generate Twisted's plug-in cache. Twisted users must do it as well. See