[Bug 1787452] Review Request: python-devtools - Dev tools for Python

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1787452

Robert-André Mauchin <zebob.m@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zebob.m@xxxxxxxxx



--- Comment #1 from Robert-André Mauchin <zebob.m@xxxxxxxxx> ---
 - Wrong summary:

%package -n python-%{pypi_name}-doc
Summary:        sphinxcontrib-asyncio documentation

 - The main subpackage doesn't depend on -doc and the LICENSE is only in the
doc package. Either make python3-%{pypi_name} depend on python-%{pypi_name}-doc
or include the license in python3-%{pypi_name}.

 - Some tests fail:

Results (0.98s):
      81 passed
       3 failed
         - tests/test_expr_render.py:35 test_exotic_types
         - tests/test_expr_render.py:141 test_kwargs_multiline
         - tests/test_main.py:91 test_small_call_frame_warning
       1 skipped


Report failures upstream.


――――――――――――――――――――――――――――――――――――――――――――――――――――――― test_exotic_types
―――――――――――――――――――――――――――――――――――――――――――――――――――――――

    def test_exotic_types():
        aa = [1, 2, 3]
        v = debug.format(
            sum(aa),
            1 == 2,
            1 < 2,
            1 << 2,
            't' if True else 'f',
            1 or 2,
            [a for a in aa],
            {a for a in aa},
            {a: a + 1 for a in aa},
            (a for a in aa),
        )
        s = re.sub(r':\d{2,}', ':<line no>', str(v))
        s = re.sub(r'(at 0x)\w+', r'\1<hash>', s)
        print(s)
        # list and generator comprehensions are wrong because ast is wrong, see
https://bugs.python.org/issue31241
>       assert (
            "tests/test_expr_render.py:<line no> test_exotic_types\n"
            "    sum(aa): 6 (int)\n"
            "    1 == 2: False (bool)\n"
            "    1 < 2: True (bool)\n"
            "    1 << 2: 4 (int)\n"
            "    't' if True else 'f': 't' (str) len=1\n"
            "    1 or 2: 1 (int)\n"
            "    [a for a in aa]: [1, 2, 3] (list) len=3\n"
            "    {a for a in aa}: {1, 2, 3} (set) len=3\n"
            "    {a: a + 1 for a in aa}: {\n"
            "        1: 2,\n"
            "        2: 3,\n"
            "        3: 4,\n"
            "    } (dict) len=3\n"
            "    (a for a in aa): (\n"
            "        1,\n"
            "        2,\n"
            "        3,\n"
            "    ) (generator)"
        ) == s
E       AssertionError: assert 'tests/test_e...) (generator)' ==
'tests/test_ex...) (generator)'
E         - tests/test_expr_render.py:<line no> test_exotic_types
E         -     sum(aa): 6 (int)
E         + tests/test_expr_render.py:<line no> test_exotic_types (error
passing code, SyntaxError: unexpected EOF while parsing (test_expr_render.py,
line 2))
E         +     6 (int)
E         -     1 == 2: False (bool)
E         ?    --------
E         +     False (bool)
E         -     1 < 2: True (bool)
E         ?    -------
E         +     True (bool)
E         -     1 << 2: 4 (int)
E         ?    --------
E         +     4 (int)
E         -     't' if True else 'f': 't' (str) len=1
E         +     't' (str) len=1
E         -     1 or 2: 1 (int)
E         ?      --------
E         +     1 (int)
E         -     [a for a in aa]: [1, 2, 3] (list) len=3
E         ?    -----------------
E         +     [1, 2, 3] (list) len=3
E         -     {a for a in aa}: {1, 2, 3} (set) len=3
E         ?    -----------------
E         +     {1, 2, 3} (set) len=3
E         -     {a: a + 1 for a in aa}: {
E         +     {
E                   1: 2,
E                   2: 3,
E                   3: 4,
E               } (dict) len=3
E         -     (a for a in aa): (
E         +     (
E                   1,
E                   2,
E                   3,
E               ) (generator)

tests/test_expr_render.py:53: AssertionError


――――――――――――――――――――――――――――――――――――――――――――――――――――― test_kwargs_multiline
―――――――――――――――――――――――――――――――――――――――――――――――――――――

    @pytest.mark.skipif(sys.version_info < (3, 6), reason='kwarg order is not
guaranteed for 3.5')
    def test_kwargs_multiline():
        v = debug.format(
            foobar(1, 2,
                   3),
            a=6,
            b=7
        )
        s = re.sub(r':\d{2,}', ':<line no>', str(v))
>       assert (
            'tests/test_expr_render.py:<line no> test_kwargs_multiline\n'
            '    foobar(1, 2, 3): 6 (int)\n'
            '    a: 6 (int)\n'
            '    b: 7 (int)'
        ) == s
E       AssertionError: assert 'tests/test_e...   b: 7 (int)' ==
'tests/test_ex...   b: 7 (int)'
E         - tests/test_expr_render.py:<line no> test_kwargs_multiline
E         -     foobar(1, 2, 3): 6 (int)
E         + tests/test_expr_render.py:<line no> test_kwargs_multiline (error
passing code, SyntaxError: unexpected EOF while parsing (test_expr_render.py,
line 2))
E         +     6 (int)
E               a: 6 (int)
E               b: 7 (int)

tests/test_expr_render.py:150: AssertionError


――――――――――――――――――――――――――――――――――――――――――――――――― test_small_call_frame_warning
―――――――――――――――――――――――――――――――――――――――――――――――――

    def test_small_call_frame_warning():
        debug_ = Debug(frame_context_length=2)
        v = debug_.format(
            1,
            2,
            3,
        )
>       assert re.sub(r':\d{2,}', ':<line no>', str(v)) == (
            "tests/test_main.py:<line no> test_small_call_frame_warning "
            "(error passing code, found <class '_ast.Tuple'> not Call)\n"
            "    1 (int)\n"
            "    2 (int)\n"
            "    3 (int)"
        )
E       AssertionError: assert 'tests/test_m...\n    3 (int)' ==
'tests/test_ma...\n    3 (int)'
E         - tests/test_main.py:<line no> test_small_call_frame_warning (error
passing code, SyntaxError: unexpected EOF while parsing (test_main.py, line 3))
E         + tests/test_main.py:<line no> test_small_call_frame_warning (error
passing code, found <class '_ast.Tuple'> not Call)
E               1 (int)
E               2 (int)
E               3 (int)

tests/test_main.py:98: AssertionError

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux