From 52c3f210ab5c81eaed361cfc7d5670b1d0752850 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 16 Sep 2025 10:37:16 +0100 Subject: [PATCH] gnu: python-pytest-examples: Update to 0.0.13. * gnu/packages/check.scm (python-pytest-examples): Update to 0.0.13. [arguments] : Rework skipped tests. [phases] {relax-requirements}: Remove black from the list. Change-Id: I642893ff64a3699dea65daa981656471ae28227f --- gnu/packages/check.scm | 70 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index f9320e16040b135ba024aecd2bed5ed8575c2667..6cb2c14c25783e2af88db6c4f9280b9154fcc80e 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1802,44 +1802,56 @@ from a .env file before running tests.") (define-public python-pytest-examples (package (name "python-pytest-examples") - (version "0.0.10") + (version "0.0.13") (source (origin ;; No tests in the PyPI tarball. (method git-fetch) (uri (git-reference - (url "https://github.com/pydantic/pytest-examples") - (commit (string-append "v" version)))) + (url "https://github.com/pydantic/pytest-examples") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0lwxgyfj6lnkhmrvb6kzfskpwfz70kxnhnjvyl3l65k568c4wb4c")))) + (base32 "11ifavc13s2b7grjv13l6am36v5kw8m9pj75j5hl4ch605ci4j27")))) (build-system pyproject-build-system) (arguments (list + ;; TODO: Rework skipped tests when ruff is availalbe. + ;; tests: 49 passed, 23 deselected, 1 xfailed #:test-flags - #~(list "-k" - (string-append - ;; Disable tests requiring pthon-ruff. - "not test_ruff" - " and not test_ruff_config" - " and not test_ruff_offset" - " and not test_ruff_ok" - " and not test_ruff_error" - " and not test_update_files" - " and not test_cases_update[simple.md]" - " and not test_cases_update[dataclass_indent.md]" - " and not test_cases_update[long_python_lines.py]" - " and not test_cases_update[simple.py]" - " and not test_cases_update[python_class.py]" - " and not test_cases_update[call_twice.md]" - " and not test_insert_print[example/README.md:3-33]" - " and not test_insert_print[example/README.md:37-40]" - " and not test_insert_print[example/README.md:44-47]" - " and not test_insert_print[example/README.md:49-66]" - " and not test_python_self[example/test_example.py:28-31]" - " and not test_python_self[example/test_example.py:40-43]" - " and not test_python_self_change_docstyle[example/test_example.py:28-31]" - " and not test_python_self_change_docstyle[example/test_example.py:40-43]")) + #~(list "-k" (string-join + ;; Disable tests requiring pthon-ruff. + (list "not test_ruff" + "test_find_examples[case_python_class.py:3-10]" + "test_find_examples[my_file.md:3-5]" + "test_find_examples[my_file.md:7-9]" + "test_find_examples[my_file.py:5-7]" + "test_find_run_examples[my_file.md:1-4]" + "test_insert_print[example/README.md:3-33]" + "test_insert_print[example/README.md:37-40]" + "test_insert_print[example/README.md:44-47]" + "test_insert_print[example/README.md:49-66]" + "test_python_self[example/test_example.py:28-31]" + "test_python_self[example/test_example.py:40-43]" + "test_python_self_change_docstyle[example/test_example.py:28-31]" + "test_python_self_change_docstyle[example/test_example.py:40-43]" + "test_ruff_config" + "test_ruff_error" + "test_ruff_offset" + "test_ruff_ok" + ;; Black incompatability faileurs. + "test_black_error" + "test_black_error_multiline" + "test_cases_update[call_twice.md]" + "test_cases_update[dataclass_indent.md]" + "test_cases_update[long_python_lines.py]" + "test_cases_update[python_class.py]" + "test_cases_update[simple.md]" + "test_cases_update[simple.py]" + "test_find_run_examples[my_file.md:3-5]" + "test_run_example_ok_fail" + "test_update_files") + " and not ")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'relax-requirements @@ -1847,9 +1859,7 @@ from a .env file before running tests.") (substitute* "pyproject.toml" ;; XXX: Removing ruff from required packages to pass Sanity ;; check, add it back when it's available. - (("'ruff>=0.0.258',") "") - ;; black>=23 - ((">=23") ">22"))))))) + (("'ruff>=0.5.0',") ""))))))) (propagated-inputs ;; TODO: Add python-ruff once it has been packaged. (list python-black python-pytest))