Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation test failures #37

Open
jaraco opened this issue Jun 12, 2023 · 1 comment
Open

Validation test failures #37

jaraco opened this issue Jun 12, 2023 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jaraco
Copy link
Owner

jaraco commented Jun 12, 2023

Several variants of test_validateWithProfile are failing to meet expectations:

 cssutils main $ tox -- -k validateWithProfile --runxfail
.pkg: _optional_hooks> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_editable> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_editable> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py: install_package> python -I -m pip install --force-reinstall --no-deps .tox/.tmp/package/78/cssutils-2.7.2.dev5+g2878ecbf-0.editable-py3-none-any.whl
py: commands[0]> pytest -k validateWithProfile --runxfail
/Users/jaraco/code/jaraco/cssutils/.tox/py/lib/python3.11/site-packages/_pytest/faulthandler.py:30: EncodingWarning: 'encoding' argument not specified
  config.stash[fault_handler_stderr_key] = open(stderr_fd_copy, "w")
============================================================= test session starts ==============================================================
platform darwin -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0
cachedir: .tox/py/.pytest_cache
rootdir: /Users/jaraco/code/jaraco/cssutils
configfile: pytest.ini
plugins: black-0.3.12, enabler-2.1.1, mypy-0.10.3, cov-4.1.0, ruff-0.1, jaraco.test-5.3.0, checkdocs-2.9.0
collected 616 items / 596 deselected / 20 selected                                                                                             

cssutils/tests/test_profiles.py ...FFFFFF..........                                                                                      [100%]

=================================================================== FAILURES ===================================================================
___________________________________________ TestProfiles.test_validateWithProfile[params3-results3] ____________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x107b28e90>, params = ('color', 'rgba(0,0,0,0)', None)
results = (True, True, ['CSS Color Module Level 3'])

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    def test_validateWithProfile(self, params, results):
        "Profiles.validate(), Profiles.validateWithProfile()"
        p = cssutils.profiles.Profiles()
        assert p.validate(*params[:2]) == results[0]
>       assert p.validateWithProfile(*params) == results
E       AssertionError: assert (True, True, ...S Level 2.1']) == (True, True, ...ule Level 3'])
E         At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3']
E         Use -v to get more diff

cssutils/tests/test_profiles.py:232: AssertionError
___________________________________________ TestProfiles.test_validateWithProfile[params4-results4] ____________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x107b29150>, params = ('color', 'rgba(0,0,0,0)', 'CSS Level 2.1')
results = (True, False, ['CSS Color Module Level 3'])

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    def test_validateWithProfile(self, params, results):
        "Profiles.validate(), Profiles.validateWithProfile()"
        p = cssutils.profiles.Profiles()
        assert p.validate(*params[:2]) == results[0]
>       assert p.validateWithProfile(*params) == results
E       AssertionError: assert (True, True, ...S Level 2.1']) == (True, False,...ule Level 3'])
E         At index 1 diff: True != False
E         Use -v to get more diff

cssutils/tests/test_profiles.py:232: AssertionError
___________________________________________ TestProfiles.test_validateWithProfile[params5-results5] ____________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x107b29410>, params = ('color', 'rgba(0,0,0,0)', 'CSS Color Module Level 3')
results = (True, True, ['CSS Color Module Level 3'])

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    def test_validateWithProfile(self, params, results):
        "Profiles.validate(), Profiles.validateWithProfile()"
        p = cssutils.profiles.Profiles()
        assert p.validate(*params[:2]) == results[0]
>       assert p.validateWithProfile(*params) == results
E       AssertionError: assert (True, False,...S Level 2.1']) == (True, True, ...ule Level 3'])
E         At index 1 diff: False != True
E         Use -v to get more diff

cssutils/tests/test_profiles.py:232: AssertionError
___________________________________________ TestProfiles.test_validateWithProfile[params6-results6] ____________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x107b296d0>, params = ('color', '1px', None)
results = (False, False, ['CSS Color Module Level 3', 'CSS Level 2.1'])

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    def test_validateWithProfile(self, params, results):
        "Profiles.validate(), Profiles.validateWithProfile()"
        p = cssutils.profiles.Profiles()
        assert p.validate(*params[:2]) == results[0]
>       assert p.validateWithProfile(*params) == results
E       AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1'])
E         At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3', 'CSS Level 2.1']
E         Use -v to get more diff

cssutils/tests/test_profiles.py:232: AssertionError
___________________________________________ TestProfiles.test_validateWithProfile[params7-results7] ____________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x107b29990>, params = ('color', '1px', 'CSS Level 2.1')
results = (False, False, ['CSS Color Module Level 3', 'CSS Level 2.1'])

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    def test_validateWithProfile(self, params, results):
        "Profiles.validate(), Profiles.validateWithProfile()"
        p = cssutils.profiles.Profiles()
        assert p.validate(*params[:2]) == results[0]
>       assert p.validateWithProfile(*params) == results
E       AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1'])
E         At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3', 'CSS Level 2.1']
E         Use -v to get more diff

cssutils/tests/test_profiles.py:232: AssertionError
___________________________________________ TestProfiles.test_validateWithProfile[params8-results8] ____________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x107b29c50>, params = ('color', '1px', 'CSS Color Module Level 3')
results = (False, False, ['CSS Color Module Level 3', 'CSS Level 2.1'])

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    def test_validateWithProfile(self, params, results):
        "Profiles.validate(), Profiles.validateWithProfile()"
        p = cssutils.profiles.Profiles()
        assert p.validate(*params[:2]) == results[0]
>       assert p.validateWithProfile(*params) == results
E       AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1'])
E         At index 2 diff: ['CSS Level 2.1'] != ['CSS Color Module Level 3', 'CSS Level 2.1']
E         Use -v to get more diff

cssutils/tests/test_profiles.py:232: AssertionError

---------- coverage: platform darwin, python 3.11.3-final-0 ----------
Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
conftest.py                                         23      2    91%   32-33
cssutils/__init__.py                               139     81    42%   132-140, 147-149, 156-158, 161, 184, 191-194, 208-216, 220, 245-254, 271-272, 281, 284-291, 295-297, 320-333, 342-344, 348, 351-352, 356-401, 406-417, 421
cssutils/_fetch.py                                  33     15    55%   9-10, 32, 36-54
cssutils/_fetchgae.py                               21     19    10%   6-67
cssutils/codec.py                                  384    337    12%   25, 45-164, 178-187, 200-216, 220-237, 241-251, 256-259, 264-268, 273-281, 284-290, 298-329, 332-335, 338, 342-344, 349-359, 362-370, 375-381, 384-390, 393-420, 423-425, 428, 432-434, 439-443, 446-453, 458-462, 465-495, 498, 502-509, 516-520, 523-545, 548, 552-559, 566-568, 584-586
cssutils/css2productions.py                          7      0   100%
cssutils/css/__init__.py                            21      0   100%
cssutils/css/colors.py                               1      0   100%
cssutils/css/csscharsetrule.py                      55     39    29%   49-57, 60, 65, 73, 92-122, 142-163
cssutils/css/csscomment.py                          28      4    86%   34, 39, 47, 76
cssutils/css/cssfontfacerule.py                     71     53    25%   43-51, 54, 60, 69, 86-152, 165-170, 185-193
cssutils/css/cssimportrule.py                      185     70    62%   61, 73-77, 85-89, 125, 142-144, 153-159, 163-172, 176-212, 220-222, 247-248, 253-254, 267, 319-329, 342, 360, 373-374, 408, 432
cssutils/css/cssmediarule.py                       123    102    17%   36-46, 49, 55, 63, 86-256, 267, 271-278, 281, 288-295, 318-339
cssutils/css/cssnamespacerule.py                   119    101    15%   70-89, 92, 99, 110, 128-228, 244-252, 268-274, 286-310
cssutils/css/csspagerule.py                        172    142    17%   72-92, 95, 102, 116, 120, 126-128, 134-139, 145-147, 157-245, 249-278, 282, 299-357, 367, 387-393, 407-412, 423-445
cssutils/css/cssproperties.py                       35      6    83%   78, 81, 84, 133, 136, 139
cssutils/css/cssrule.py                            115     51    56%   80, 123, 136, 165-167, 171, 175-183, 210-229, 237-272, 276-279, 283, 321
cssutils/css/cssrulelist.py                         19      6    68%   26, 41-44, 49
cssutils/css/cssstyledeclaration.py                198     75    62%   121-125, 130-134, 139, 146, 154-158, 167, 197, 204, 210, 241, 262, 277, 283-284, 316, 325-333, 337-345, 381, 384, 421, 490-502, 523, 540-544, 575-592, 639-640, 643, 657-669, 696-697, 716, 735
cssutils/css/cssstylerule.py                        98     31    68%   44, 47, 54-58, 65, 108-109, 116, 121, 125, 136-137, 143-144, 152-153, 163-164, 171, 188-191, 235-239, 254, 274
cssutils/css/cssstylesheet.py                      370    221    40%   76-80, 88-92, 117, 128-130, 146, 180-182, 186-200, 208-213, 221-244, 248-262, 266-270, 274-278, 282-286, 290-307, 358-361, 401, 405, 411-413, 416-420, 429-432, 440-450, 472, 478-479, 493, 516-549, 590-591, 599-630, 638-640, 643-644, 649-666, 670-681, 687-701, 709-713, 716-730, 736-791, 795-843, 849-850, 853-859, 878-882, 889-892, 902
cssutils/css/cssunknownrule.py                     106     93    12%   26-31, 34, 39, 47, 64-215
cssutils/css/cssvalue.py                           437    308    30%   49-62, 65, 68, 117-409, 558, 561, 605-625, 629-636, 656-662, 665-667, 676, 684-687, 691-707, 728-749, 773-803, 815-823, 851-881, 891-894, 902-904, 914-917, 921, 925, 948-949, 953-954, 957, 970, 978-981, 1004-1010, 1014-1060, 1063-1097, 1120-1132, 1135, 1138, 1146-1194, 1208-1236, 1239, 1242, 1257-1287, 1290, 1294, 1312-1313, 1316, 1319, 1327-1345, 1360-1368
cssutils/css/cssvariablesdeclaration.py            105     72    31%   46, 51, 56, 68, 74, 77, 80, 93, 126-199, 209, 230-233, 250-264, 282-315, 332-335
cssutils/css/cssvariablesrule.py                    63     45    29%   55-66, 69, 76, 90, 118-183, 201-208
cssutils/css/marginrule.py                          54     33    39%   82-94, 98-110, 123, 130, 139, 156-205, 218-223
cssutils/css/property.py                           197     50    75%   90, 104-106, 132-135, 140-141, 146-147, 157-158, 175, 200-202, 222-223, 246, 268, 284, 287, 294, 325-329, 344-346, 356-358, 371-372, 381, 465-466, 470, 488, 499-510, 521, 532, 536
cssutils/css/selector.py                           352    209    41%   125-129, 132, 163-164, 171-172, 187, 226-227, 230, 245, 249, 257-261, 269, 276-280, 289, 297, 306, 314, 348, 352-354, 358, 361, 372, 377-393, 401, 403, 440-441, 447-450, 457, 461-474, 479-494, 506-532, 536-544, 550-559, 563-581, 591-592, 596-597, 602-603, 608-609, 617-619, 623-636, 640-653, 657-740, 744-752, 756-758, 796-797, 803-804, 809-810, 857
cssutils/css/selectorlist.py                       101     52    49%   41, 46-50, 53, 65-67, 71-78, 84-90, 109, 131-152, 156, 180-181, 193, 201-202, 211-212, 216-217
cssutils/css/value.py                              336    120    64%   54-56, 64-67, 71, 74, 77, 92, 180-181, 187, 209, 257, 260, 305, 332, 408-418, 421-478, 504-506, 522, 527, 532, 547, 576, 582, 612, 643, 655-661, 675-703, 706-712, 736-774, 777, 796, 801-856, 879, 887-924, 943, 949-964
cssutils/cssproductions.py                          15      0   100%
cssutils/errorhandler.py                            56     10    82%   47, 84, 91, 95-102, 108
cssutils/helper.py                                  47      7    85%   26-33, 91, 103, 116, 130
cssutils/parse.py                                   57     22    61%   51, 53, 58, 92-100, 134, 175-183, 207-215
cssutils/prodparser.py                             377     82    78%   111-115, 121, 155-157, 170-171, 183-187, 230, 235, 238, 241, 249, 324-327, 340, 361, 394, 398-404, 426, 429, 434-439, 442, 491-492, 526, 535, 543-545, 549, 574-598, 618, 630-634, 661-667, 674, 677-681, 689-690, 707, 898-905
cssutils/profiles.py                               180     50    72%   191, 195-198, 222-244, 287-292, 328-350, 359-367, 386-390, 432-433, 442-443
cssutils/sac.py                                    235    200    15%   31, 34, 37, 40, 63-66, 70, 75, 79, 84, 89, 94, 98, 103, 107, 114-115, 120-122, 127-128, 138-139, 145-148, 151, 154-155, 190-199, 202-432, 436, 440
cssutils/script.py                                 178    147    17%   33, 36-48, 51-52, 56, 60, 85-99, 107-125, 142-158, 171-203, 212-221, 233-256, 275-314, 347-374
cssutils/scripts/__init__.py                         2      0   100%
cssutils/scripts/csscapture.py                      32     25    22%   18-85, 95
cssutils/scripts/csscombine.py                      19     13    32%   61-115, 119
cssutils/scripts/cssparse.py                        34     28    18%   17-72, 76
cssutils/serialize.py                              594    288    52%   17-18, 114-115, 126, 227-230, 232, 234, 238, 245, 247, 251, 263, 266, 271, 273-274, 277, 279, 281, 283-284, 286, 332, 372-380, 397, 417-420, 430-433, 446-458, 469-481, 510, 515-519, 523, 536-548, 559-604, 620-653, 657-663, 677-706, 714-745, 762-777, 783, 791-792, 817, 821, 848-860, 864, 868-895, 934-935, 943-950, 958, 976, 980, 997, 1014-1022, 1027, 1033, 1038-1041, 1046-1049, 1054, 1060-1071, 1075-1083, 1087, 1107-1108, 1113, 1119, 1125-1142, 1147-1158, 1162-1180, 1190, 1199, 1212, 1220-1221
cssutils/settings.py                                 6      5    17%   12-17
cssutils/stylesheets/__init__.py                     5      0   100%
cssutils/stylesheets/medialist.py                  109     53    51%   46, 56, 62, 69-71, 120-121, 127-129, 147-154, 166-172, 180-182, 203-234, 238, 251-259, 268-271
cssutils/stylesheets/mediaquery.py                  52     10    81%   69, 75, 175-176, 208, 218-224
cssutils/stylesheets/stylesheet.py                  19      0   100%
cssutils/stylesheets/stylesheetlist.py               8      4    50%   24-27
cssutils/tests/__init__.py                           0      0   100%
cssutils/tests/basetest.py                          37     23    38%   9, 16, 22-28, 33-36, 40-44, 48-50, 54-56
cssutils/tests/test_codec.py                       212    196     8%   19, 23-28, 31-38, 44-118, 123-126, 130-143, 148-250, 256-311, 316-365
cssutils/tests/test_csscharsetrule.py               59     46    22%   11-14, 18-23, 27, 31-46, 50-61, 69-95, 99-100, 104-112
cssutils/tests/test_csscomment.py                   24     16    33%   10-13, 17-47, 53, 57-63
cssutils/tests/test_cssfontfacerule.py             130    116    11%   13-16, 20-58, 62-96, 100-164, 168-192, 196-201, 205-209, 213-231, 235-242
cssutils/tests/test_cssimportrule.py               226    208     8%   14-17, 21-81, 85-172, 177-202, 207-227, 231-245, 249-293, 297-324, 329-391, 395-409, 413, 417-430
cssutils/tests/test_cssmediarule.py                212    192     9%   13-19, 23-43, 47-57, 61-82, 86-111, 115-246, 253-263, 267-294, 299-333, 337-357, 362-368, 373-416, 420, 424-430, 434-442
cssutils/tests/test_cssnamespacerule.py            107     94    12%   11-15, 19-52, 57-125, 130-144, 148-173, 177, 181-200, 204-215
cssutils/tests/test_csspagerule.py                 193    176     9%   11-14, 18-57, 61-65, 69-73, 77-141, 145-174, 178-206, 210-229, 233-311, 315-378, 382-409, 413-421
cssutils/tests/test_cssproperties.py                28     21    25%   11-17, 21-27, 31-44
cssutils/tests/test_cssrule.py                     128    116     9%   28-29, 32-36, 40-44, 48-131, 135-192, 196-202, 216-251
cssutils/tests/test_cssrulelist.py                  17     12    29%   10-17, 21-35
cssutils/tests/test_cssstyledeclaration.py         313    283    10%   11, 15-31, 35-60, 64-70, 74-94, 98-101, 106-154, 158-170, 174-200, 205-263, 267-270, 274-298, 302-311, 315-343, 347-351, 373-397, 401-413, 417-436, 440-486, 490-500, 504-520, 524-540, 544-572, 576-581, 585-594
cssutils/tests/test_cssstylerule.py                130    115    12%   11-14, 18-23, 27-109, 113-163, 167-179, 183-191, 195-200, 204-223, 231-239, 243-248
cssutils/tests/test_cssstylesheet.py               486    450     7%   11-13, 17-35, 39-48, 52-105, 109-120, 124-230, 234-255, 262-271, 275-294, 299-351, 357-426, 444-476, 481-505, 510-515, 519-548, 552-578, 582-607, 611-672, 675-720, 724-745, 753-780, 784-797, 801-805, 809-813, 817-821, 825-829, 833-847, 851-856, 860-871, 875-886, 889-897
cssutils/tests/test_cssunknownrule.py               55     46    16%   10-13, 17-54, 58-126, 130, 134-137
cssutils/tests/test_cssutils.py                    216    195    10%   17, 29-72, 77-190, 194-231, 245-258, 262-276, 283-315, 319-350, 359-477
cssutils/tests/test_cssutilsimport.py                8      5    38%   9-18
cssutils/tests/test_cssvalue.py                    306    276    10%   16, 20-23, 27-41, 45-94, 100-266, 270-274, 278-334, 338-346, 350-358, 364-383, 387-389, 393-417, 421-454, 461-501, 505-652, 656-679, 684-816, 820-837, 841-850, 856-864, 868-896, 900-906
cssutils/tests/test_cssvariablesdeclaration.py     101     87    14%   11, 15-26, 30-35, 39-70, 74-75, 80-125, 129-145, 150-311, 336-343, 347-352
cssutils/tests/test_cssvariablesrule.py             87     74    15%   11-16, 20-31, 35-39, 43-47, 51-64, 68-72, 76-133, 137-143
cssutils/tests/test_domimplementation.py            25     15    40%   12, 16-22, 26-27, 31-32, 36-43
cssutils/tests/test_encutils/__init__.py            57     41    28%   20-37, 41-56, 60-76, 80-95, 99-188, 192-208, 212-227, 232-466
cssutils/tests/test_errorhandler.py                 98     83    15%   19-20, 28-34, 38-71, 75-90, 94-124, 127-152
cssutils/tests/test_helper.py                       33     26    21%   9-20, 24-35, 39-45, 49-55, 59-61
cssutils/tests/test_marginrule.py                   40     29    28%   11-14, 19-34, 49-54, 57-68, 83-91
cssutils/tests/test_medialist.py                   103     85    17%   14, 18-34, 38-75, 79-95, 99, 107-115, 119-131, 135-141, 145-173, 177-180, 184-192
cssutils/tests/test_mediaquery.py                   33     23    30%   11, 15-49, 53-66, 71-90, 94-99
cssutils/tests/test_parse.py                       214    191    11%   17-20, 24-60, 64-69, 74-141, 147-228, 232-290, 307-408, 412-422, 426-437, 447-481, 485-500, 505-516, 520-532, 537-549, 553-562
cssutils/tests/test_prodparser.py                  232    205    12%   21-28, 32-35, 40-49, 53-76, 80-85, 91-96, 100-116, 120-127, 131-141, 145-163, 167-252, 258-290, 294-309, 313-334, 338-348, 353, 357-369, 373-422
cssutils/tests/test_profiles.py                    113     61    46%   33-38, 42-47, 52-78, 84-118, 122-127, 236, 243-264, 272-696
cssutils/tests/test_properties.py                   65     53    18%   13-67, 71, 75-93, 99-110, 114-209, 213-230, 240-246
cssutils/tests/test_property.py                    119    103    13%   15, 19-63, 67-108, 112-145, 149-154, 158-169, 173-206, 210-236, 240-254
cssutils/tests/test_scripts_csscombine.py           29     22    24%   15-36, 41-61
cssutils/tests/test_selector.py                     82     67    18%   20, 24-41, 45-70, 74-113, 122-132, 139-149, 153-377, 381-445, 449-457
cssutils/tests/test_selectorlist.py                 82     70    15%   12, 16-33, 38-56, 60-100, 104-136, 140-148
cssutils/tests/test_serialize.py                   297    264    11%   14-44, 48-117, 121-201, 205-210, 214-231, 235-239, 243-260, 264-274, 278-298, 302-314, 321-325, 330-387, 398-429, 433-470, 475-488, 492-499, 503-511, 515-519, 523-527, 531-539, 543-547, 551-555, 559-562, 565-577, 582-608, 617-657, 661-669, 677-685, 690-730
cssutils/tests/test_settings.py                      9      5    44%   10-18
cssutils/tests/test_stylesheet.py                   21     18    14%   9-38
cssutils/tests/test_tokenize2.py                    58     36    38%   502, 506-526, 530-556, 574, 585
cssutils/tests/test_util.py                        197    163    17%   18-44, 50-61, 67-144, 153-368, 381-500, 507, 510-524, 527-529, 532-534, 537-539, 542-543, 546-548, 551-554, 557-558, 561, 564-565, 568-569, 572-575, 578-581, 584-587, 590-591, 594
cssutils/tests/test_value.py                       394    348    12%   11, 15-34, 38-298, 303-315, 320-341, 345-349, 353-361, 365-373, 379-382, 387-414, 420-425, 429-486, 490-518, 524-538, 542-551, 555-588, 594-598, 603-645, 651-654, 658-673, 679-683, 687-711, 716-772, 779-798, 802-804, 808-832, 836-869, 876-916, 920-1066, 1070-1093, 1098-1230, 1234-1251
cssutils/tests/test_x.py                            28     22    21%   14-42
cssutils/tokenize2.py                              134     35    74%   39, 88, 113-117, 132-134, 138-141, 163-168, 187, 192, 197-202, 227-236, 288-290
cssutils/util.py                                   500    208    58%   36, 46-51, 70, 102-105, 108, 111, 114-118, 125, 129, 209, 227, 232, 236, 249, 258-265, 302-303, 306-307, 311-313, 323-325, 327-328, 337, 339, 341, 347-348, 355, 357, 360, 362, 377, 380-383, 400-410, 414-415, 419, 423, 470-475, 486-487, 514-529, 534-535, 542-543, 579, 587-596, 624, 633-636, 639, 650-653, 659, 665-669, 699, 730, 733, 736, 745, 749, 753, 779, 782, 789-799, 802-805, 808, 811, 815-827, 831-836, 849-850, 863, 869-872, 875, 894, 902, 909, 952-997, 1061-1066, 1073-1074, 1081-1086, 1095-1100, 1107-1108, 1115-1116
docs/conf.py                                        10      0   100%
encutils/__init__.py                               219    178    19%   69-72, 132, 144-147, 150, 184, 202-229, 236-239, 254-271, 284-294, 310-331, 356-428, 449-483, 567-684, 688-690
examples/__init__.py                                 0      0   100%
examples/build.py                                   25     18    28%   44-69, 73
examples/codec.py                                   11      5    55%   11-15
examples/cssencodings.py                            25     20    20%   44-77, 81
examples/customlog.py                               14      7    50%   16-23, 27
examples/imports.py                                 21     15    29%   27-42, 46
examples/minify.py                                  14     10    29%   6-25, 29
examples/parse.py                                   19     13    32%   9-29, 33
examples/properties_with_same_name.py               30      0   100%
examples/selectors_tolower.py                       18     13    28%   8-29, 33
examples/serialize.py                               37      0   100%
examples/styledeclaration.py                        31      0   100%
examples/testutil.py                                66     48    27%   23, 26-29, 32-33, 39-44, 48-60, 69-76, 82-109, 113
examples/website.py                                  8      0   100%
------------------------------------------------------------------------------
TOTAL                                            12579   8528    32%

=========================================================== short test summary info ============================================================
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params3-results3] - AssertionError: assert (True, True, ...S Level 2.1']) == (True, True, ...ule Level 3'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params4-results4] - AssertionError: assert (True, True, ...S Level 2.1']) == (True, False,...ule Level 3'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params5-results5] - AssertionError: assert (True, False,...S Level 2.1']) == (True, True, ...ule Level 3'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params6-results6] - AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params7-results7] - AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile[params8-results8] - AssertionError: assert (False, False...S Level 2.1']) == (False, False...S Level 2.1'])
================================================= 6 failed, 13 passed, 596 deselected in 1.26s =================================================
py: exit 1 (1.57 seconds) /Users/jaraco/code/jaraco/cssutils> pytest -k validateWithProfile --runxfail pid=34681
.pkg: _exit> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py: FAIL code 1 (2.55=setup[0.97]+cmd[1.57] seconds)
  evaluation failed :( (2.61 seconds)

Someone should investigate and ascertain if those tests are meaningful and if something should be corrected or if those tests should be removed.

@jaraco jaraco added help wanted Extra attention is needed good first issue Good for newcomers labels Jun 12, 2023
@jaraco
Copy link
Owner Author

jaraco commented Jun 12, 2023

Additionally, tests fail around font checks:

 cssutils main $ tox -- -p no:cov -k test_validateWithProfile_fonts -v --runxfail
.pkg: _optional_hooks> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_editable> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_editable> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py: install_package> python -I -m pip install --force-reinstall --no-deps .tox/.tmp/package/94/cssutils-2.7.2.dev7+g0dfc5f7c.d20230612-0.editable-py3-none-any.whl
py: commands[0]> pytest -p no:cov -k test_validateWithProfile_fonts -v --runxfail
/Users/jaraco/code/jaraco/cssutils/.tox/py/lib/python3.11/site-packages/_pytest/faulthandler.py:30: EncodingWarning: 'encoding' argument not specified
  config.stash[fault_handler_stderr_key] = open(stderr_fd_copy, "w")
============================================================= test session starts ==============================================================
platform darwin -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0 -- /Users/jaraco/code/jaraco/cssutils/.tox/py/bin/python
cachedir: .tox/py/.pytest_cache
rootdir: /Users/jaraco/code/jaraco/cssutils
configfile: pytest.ini
plugins: black-0.3.12, enabler-2.1.1, mypy-0.10.3, ruff-0.1, jaraco.test-5.3.0, checkdocs-2.9.0
collected 621 items / 615 deselected / 6 selected                                                                                              

cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params0-results0] FAILED                                   [ 20%]
cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params1-results1] FAILED                                   [ 40%]
cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params2-results2] FAILED                                   [ 60%]
cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params3-results3] FAILED                                   [ 80%]
cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params4-results4] FAILED                                   [100%]

=================================================================== FAILURES ===================================================================
________________________________________ TestProfiles.test_validateWithProfile_fonts[params0-results0] _________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x110165510>
params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-family', ('y', '"y"'))
results = (True, True, ('CSS Fonts Module Level 3 @font-face properties',))

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    @pytest.mark.xfail(reason="#37")
    def test_validateWithProfile_fonts(self, params, results):
        "Profiles.validateWithProfile()"
        # testing for valid values overwritten in a profile
        v, m, p = results
        expected = v, m, list(p)
>       assert cssutils.profile.validateWithProfile(*params) == expected
E       AssertionError: assert (False, False, []) == (True, True, ... properties'])
E         At index 0 diff: False != True
E         Full diff:
E         - (True, True, ['CSS Fonts Module Level 3 @font-face properties'])
E         + (False, False, [])

cssutils/tests/test_profiles.py:743: AssertionError
________________________________________ TestProfiles.test_validateWithProfile_fonts[params1-results1] _________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x110165650>
params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-family', ('"y", "a"', 'a, b', 'a a'))
results = (True, False, ('CSS Level 2.1',))

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    @pytest.mark.xfail(reason="#37")
    def test_validateWithProfile_fonts(self, params, results):
        "Profiles.validateWithProfile()"
        # testing for valid values overwritten in a profile
        v, m, p = results
        expected = v, m, list(p)
>       assert cssutils.profile.validateWithProfile(*params) == expected
E       AssertionError: assert (False, False, []) == (True, False,...S Level 2.1'])
E         At index 0 diff: False != True
E         Full diff:
E         - (True, False, ['CSS Level 2.1'])
E         + (False, False, [])

cssutils/tests/test_profiles.py:743: AssertionError
________________________________________ TestProfiles.test_validateWithProfile_fonts[params2-results2] _________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x110165790>
params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-stretch', ('normal', 'wider', 'narrower', 'inherit'))
results = (True, False, ('CSS Fonts Module Level 3',))

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    @pytest.mark.xfail(reason="#37")
    def test_validateWithProfile_fonts(self, params, results):
        "Profiles.validateWithProfile()"
        # testing for valid values overwritten in a profile
        v, m, p = results
        expected = v, m, list(p)
>       assert cssutils.profile.validateWithProfile(*params) == expected
E       AssertionError: assert (False, False, []) == (True, False,...ule Level 3'])
E         At index 0 diff: False != True
E         Full diff:
E         - (True, False, ['CSS Fonts Module Level 3'])
E         + (False, False, [])

cssutils/tests/test_profiles.py:743: AssertionError
________________________________________ TestProfiles.test_validateWithProfile_fonts[params3-results3] _________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x110165a50>
params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-style', ('inherit',)), results = (True, False, ('CSS Level 2.1',))

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    @pytest.mark.xfail(reason="#37")
    def test_validateWithProfile_fonts(self, params, results):
        "Profiles.validateWithProfile()"
        # testing for valid values overwritten in a profile
        v, m, p = results
        expected = v, m, list(p)
>       assert cssutils.profile.validateWithProfile(*params) == expected
E       AssertionError: assert (False, False, []) == (True, False,...S Level 2.1'])
E         At index 0 diff: False != True
E         Full diff:
E         - (True, False, ['CSS Level 2.1'])
E         + (False, False, [])

cssutils/tests/test_profiles.py:743: AssertionError
________________________________________ TestProfiles.test_validateWithProfile_fonts[params4-results4] _________________________________________

self = <cssutils.tests.test_profiles.TestProfiles object at 0x110165d10>
params = (('CSS Fonts Module Level 3 @font-face properties',), 'font-weight', ('bolder', 'lighter', 'inherit'))
results = (True, False, ('CSS Level 2.1',))

    @pytest.mark.parametrize(('params', 'results'), _gen_validation_inputs())
    @pytest.mark.xfail(reason="#37")
    def test_validateWithProfile_fonts(self, params, results):
        "Profiles.validateWithProfile()"
        # testing for valid values overwritten in a profile
        v, m, p = results
        expected = v, m, list(p)
>       assert cssutils.profile.validateWithProfile(*params) == expected
E       AssertionError: assert (False, False, []) == (True, False,...S Level 2.1'])
E         At index 0 diff: False != True
E         Full diff:
E         - (True, False, ['CSS Level 2.1'])
E         + (False, False, [])

cssutils/tests/test_profiles.py:743: AssertionError
=========================================================== short test summary info ============================================================
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params0-results0] - AssertionError: assert (False, False, []) == (True, True, ... properties'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params1-results1] - AssertionError: assert (False, False, []) == (True, False,...S Level 2.1'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params2-results2] - AssertionError: assert (False, False, []) == (True, False,...ule Level 3'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params3-results3] - AssertionError: assert (False, False, []) == (True, False,...S Level 2.1'])
FAILED cssutils/tests/test_profiles.py::TestProfiles::test_validateWithProfile_fonts[params4-results4] - AssertionError: assert (False, False, []) == (True, False,...S Level 2.1'])
====================================================== 5 failed, 615 deselected in 0.38s =======================================================
py: exit 1 (0.58 seconds) /Users/jaraco/code/jaraco/cssutils> pytest -p no:cov -k test_validateWithProfile_fonts -v --runxfail pid=36421
.pkg: _exit> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py: FAIL code 1 (1.42=setup[0.83]+cmd[0.58] seconds)
  evaluation failed :( (1.47 seconds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant