unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob d9622bab717a6c55a2ac28bb7437b2f5f1a375ed 2034 bytes (raw)
name: gnu/packages/patches/python-matplotlib-fix-tests.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
Patch the tests to prevent the error "pytest ids must be list of strings, found: 0".

The PyTest documentation states that "Numbers, strings, booleans and None will
have their usual string representation used in the test ID. For other objects,
pytest will make a string based on the argument name".

https://docs.pytest.org/en/6.2.x/example/parametrize.html#different-options-for-test-ids

--- a/lib/matplotlib/tests/test_mathtext.py
+++ b/lib/matplotlib/tests/test_mathtext.py
@@ -184,8 +184,7 @@ def baseline_images(request, fontset, index, text):
     return ['%s_%s_%02d' % (request.param, fontset, index)]
 
 
-@pytest.mark.parametrize(
-    'index, text', enumerate(math_tests), ids=range(len(math_tests)))
+@pytest.mark.parametrize('index, text', enumerate(math_tests))
 @pytest.mark.parametrize(
     'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
 @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
@@ -197,8 +196,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, text):
              horizontalalignment='center', verticalalignment='center')
 
 
-@pytest.mark.parametrize('index, text', enumerate(lightweight_math_tests),
-                         ids=range(len(lightweight_math_tests)))
+@pytest.mark.parametrize('index, text', enumerate(lightweight_math_tests))
 @pytest.mark.parametrize('fontset', ['dejavusans'])
 @pytest.mark.parametrize('baseline_images', ['mathtext1'], indirect=True)
 @image_comparison(baseline_images=None, extensions=['png'])
@@ -208,8 +206,7 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text):
              horizontalalignment='center', verticalalignment='center')
 
 
-@pytest.mark.parametrize(
-    'index, text', enumerate(font_tests), ids=range(len(font_tests)))
+@pytest.mark.parametrize('index, text', enumerate(font_tests))
 @pytest.mark.parametrize(
     'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
 @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)

debug log:

solving d9622bab71 ...
found d9622bab71 in https://yhetil.org/guix-patches/CA+3U0Zno9wPf7jGtse0GeuGvAFV0zzPEocWuWLdUSzGYeZveuw@mail.gmail.com/

applying [1/1] https://yhetil.org/guix-patches/CA+3U0Zno9wPf7jGtse0GeuGvAFV0zzPEocWuWLdUSzGYeZveuw@mail.gmail.com/
diff --git a/gnu/packages/patches/python-matplotlib-fix-tests.patch b/gnu/packages/patches/python-matplotlib-fix-tests.patch
new file mode 100644
index 0000000000..d9622bab71

1:19: trailing whitespace.
 
1:20: trailing whitespace.
 
1:29: trailing whitespace.
 
1:30: trailing whitespace.
 
1:39: trailing whitespace.
 
Checking patch gnu/packages/patches/python-matplotlib-fix-tests.patch...
Applied patch gnu/packages/patches/python-matplotlib-fix-tests.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

index at:
100644 d9622bab717a6c55a2ac28bb7437b2f5f1a375ed	gnu/packages/patches/python-matplotlib-fix-tests.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).