[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#67237] [PATCH 28/32] gnu: python-pytest-socket: Enable tests.
From: |
Sharlatan Hellseher |
Subject: |
[bug#67237] [PATCH 28/32] gnu: python-pytest-socket: Enable tests. |
Date: |
Fri, 17 Nov 2023 12:16:17 +0000 |
* gnu/packages/python-check.scm (python-pytest-socket): Improve package
style, enable tests.
[build-system]: Swap to pyproject-build-system.
[arguments]{tests-flags}: Disable test requiring network access.
{phases}: Swap to use standard phases.
Change-Id: I7cdd98bc501caddc982bb5ffa21354e3987242f9
---
gnu/packages/python-check.scm | 38 +++++++++++++----------------------
1 file changed, 14 insertions(+), 24 deletions(-)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index e7de83539d..7412c04ce0 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -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
--
2.41.0
- [bug#67237] [PATCH 04/32] gnu: python-asdf-3.0: Update to 3.0.1., (continued)
- [bug#67237] [PATCH 04/32] gnu: python-asdf-3.0: Update to 3.0.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 07/32] gnu: python-crds: Update to 11.17.9., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 06/32] gnu: python-casa-formats-io: Update to 0.2.2., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 13/32] gnu: python-rad: Update to 0.18.0., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 02/32] gnu: gpredict: Improve package style., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 14/32] gnu: python-roman-datamodels: Update to 0.18.0., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 22/32] gnu: python-extension-helpers: Improve style., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 27/32] gnu: python-pytest-socket: Update to 0.6.0., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 30/32] gnu: python-synphot: Enable tests., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 31/32] gnu: python-stsci-stimage: Enable tests., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 28/32] gnu: python-pytest-socket: Enable tests.,
Sharlatan Hellseher <=
- [bug#67237] [PATCH 05/32] gnu: python-astroalign: Update to 2.5.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 16/32] gnu: python-wiimatch: Update to 0.3.2., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 15/32] gnu: python-sgp4: Update to 2.23., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 03/32] gnu: libpasastro: Update to 1.4.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 11/32] gnu: python-pynbody: Update to 1.4.2., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 19/32] gnu: python-stsci-imagestats: Swap to pyproject-build-system., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 12/32] gnu: python-pynbody: Prepare for cross compilation., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 18/32] gnu: python-drms: Simplify package., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 10/32] gnu: python-posix-ipc: Update to 1.1.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 17/32] gnu: splash: Update to 3.9.0., Sharlatan Hellseher, 2023/11/17