@@ -429,31 +429,21 @@ (define-public python-pytest-socket
(sha256
(base32
"0f3irpd8lwmm3pb1fqnvwg82kpkhsnzsmw8jg7yd85c349kisg1n"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- ;; FIXME: Tests fail a lot, probably requiring Internet access.
- (list #:tests? #f
- #:phases #~(modify-phases %standard-phases
- (replace 'build
- (lambda _
- (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
- #$version)
- (setenv "SOURCE_DATE_EPOCH" "315532800")
- (invoke "python"
- "-m"
- "build"
- "--wheel"
- "--no-isolation"
- ".")))
- (add-before 'check 'disable-unsupported-test
- (lambda _
- (substitute* "tests/test_async.py"
- (("def test_asynctest")
- "def __off_test_asynctest"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "python" "-m" "pytest" "-vvv")))))))
+ (list
+ #:test-flags
+ #~(list "-k"
+ (string-append
+ ;; Disable tests requiring network access.
+ "not test_urlopen_disabled"
+ " and not test_parametrize_with_socket_enabled_and_allow_hosts"
+ " and not test_enabled_urllib_succeeds"
+ " and not test_urllib_succeeds_by_default"
+ " and not test_disabled_urllib_fails"
+ " and not test_httpx_fails"
+ " and not test_asynctest"
+ " and not test_global_disable_and_allow_host"))))
(native-inputs (list python-httpx
python-poetry-core
python-pypa-build