From 4a8bade08791946cf81e13eb7e14e9cca47619ae Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 5 Aug 2025 16:16:01 +0100 Subject: [PATCH] gnu: python-betamax: Enable tests, switch to pyproject-build-system. * gnu/packages/python-web.scm (python-betamax): Enable tests. [build-system]: Use pyproject. [arguments] : Skip tests requiring networking. [native-inputs]: Add nss-certs-for-test, python-pytest, and python-setuptools. Change-Id: I3488dcf5849584f9d65d3e26d8dbfa9bbb2ba0e8 --- gnu/packages/python-web.scm | 45 ++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 07e123ef4a73456d537a7f3f27642dada4eb29a7..ac9e70d93842d13004807e9f3f6bcb4b1266a233 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -6435,22 +6435,45 @@ provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients." (name "python-betamax") (version "0.9.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "betamax" version)) - (sha256 - (base32 - "152zil1j4gl1whnldi08zwjr4z2bnlbd061kr3ipjs5wg4b6wcc2")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "betamax" version)) + (sha256 + (base32 + "152zil1j4gl1whnldi08zwjr4z2bnlbd061kr3ipjs5wg4b6wcc2")))) + (build-system pyproject-build-system) (arguments - '(;; Many tests fail because they require networking. - #:tests? #f)) + (list + #:test-flags + #~(list "-k" (string-join + ;; Tests require network access to http://httpbin.org/get. + (list "not test_creates_new_cassettes" + "test_placeholders_work" + "test_post_start_hook" + "test_pre_stop_hook" + "test_preplayback_hook" + "test_prerecord_hook" + "test_prerecord_ignoring_hook" + "test_records_new_events_with_existing_cassette" + "test_records_new_interaction" + "test_records_new_interactions" + "test_replaces_old_interactions" + "test_replays_response_from_cassette" + "test_requests_with_json_body" + "test_saves_content_as_gzip" + "test_unicode_is_saved_properly") + " and not ")))) + (native-inputs + (list nss-certs-for-test + python-pytest + python-setuptools)) (propagated-inputs (list python-requests)) (home-page "https://github.com/sigmavirus24/betamax") (synopsis "Record HTTP interactions with python-requests") - (description "Betamax will record your test suite's HTTP interactions and -replay them during future tests. It is designed to work with python-requests.") + (description + "Betamax will record your test suite's HTTP interactions and replay them +during future tests. It is designed to work with python-requests.") (license license:expat))) (define-public python-betamax-matchers