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

current release has test failures when building with Python 3.10 #55

Closed
flokli opened this issue Aug 25, 2022 · 3 comments
Closed

current release has test failures when building with Python 3.10 #55

flokli opened this issue Aug 25, 2022 · 3 comments

Comments

@flokli
Copy link

flokli commented Aug 25, 2022

============================= test session starts ==============================
platform linux -- Python 3.10.6, pytest-7.1.2, pluggy-1.0.0
rootdir: /build/source
collected 1266 items                                                           

tests/test_box.py ...................................................... [  4%]
........................................................................ [  9%]
........................................................................ [ 15%]
........FF............                                                   [ 17%]
tests/test_scopes.py s.................................................. [ 21%]
........................................................................ [ 27%]
........................................................................ [ 32%]
........................................................................ [ 38%]
........................................................................ [ 44%]
................................                                         [ 46%]
tests/test_stack.py .................................................... [ 50%]
........................................................................ [ 56%]
........................................................................ [ 62%]
........................................................................ [ 67%]
........................................................................ [ 73%]
........................................................................ [ 79%]
..........................................................FFFF.......... [ 84%]
..............                                                           [ 86%]
tests/contrib/test_flaskscopes.py ...................................... [ 89%]
........................................................................ [ 94%]
...................................................................      [100%]

=================================== FAILURES ===================================
____________________ test_box_pass_unexpected_argument[Box] ____________________

boxclass = <class 'picobox._box.Box'>

    def test_box_pass_unexpected_argument(boxclass):
        testbox = boxclass()
        testbox.put('d', 10)
    
        @testbox.pass_('d')
        def fn(a, b):
            return a + b
    
        with pytest.raises(TypeError) as excinfo:
            fn(1, 2)
    
>       assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
E       assert "test_box_pas... argument 'd'" == "fn() got an ... argument 'd'"
E         - fn() got an unexpected keyword argument 'd'
E         + test_box_pass_unexpected_argument.<locals>.fn() got an unexpected keyword argument 'd'

tests/test_box.py:371: AssertionError
_________________ test_box_pass_unexpected_argument[ChainBox] __________________

boxclass = <class 'picobox._box.ChainBox'>

    def test_box_pass_unexpected_argument(boxclass):
        testbox = boxclass()
        testbox.put('d', 10)
    
        @testbox.pass_('d')
        def fn(a, b):
            return a + b
    
        with pytest.raises(TypeError) as excinfo:
            fn(1, 2)
    
>       assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
E       assert "test_box_pas... argument 'd'" == "fn() got an ... argument 'd'"
E         - fn() got an unexpected keyword argument 'd'
E         + test_box_pass_unexpected_argument.<locals>.fn() got an unexpected keyword argument 'd'

tests/test_box.py:371: AssertionError
______________ test_box_pass_unexpected_argument[Box-teststack0] _______________

boxclass = <class 'picobox._box.Box'>, teststack = <Stack (0x7ffff64c56f0)>

    def test_box_pass_unexpected_argument(boxclass, teststack):
        testbox = boxclass()
        testbox.put('d', 10)
    
        @teststack.pass_('d')
        def fn(a, b):
            return a + b
    
        with teststack.push(testbox):
            with pytest.raises(TypeError) as excinfo:
                fn(1, 2)
    
>       assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
E       assert "test_box_pas... argument 'd'" == "fn() got an ... argument 'd'"
E         - fn() got an unexpected keyword argument 'd'
E         + test_box_pass_unexpected_argument.<locals>.fn() got an unexpected keyword argument 'd'

tests/test_stack.py:437: AssertionError
________________ test_box_pass_unexpected_argument[Box-picobox] ________________

boxclass = <class 'picobox._box.Box'>
teststack = <module 'picobox' from '/nix/store/322w5r8nncx3yhms0aaslyf72pv0632d-python3.10-picobox-2.2.0/lib/python3.10/site-packages/picobox/__init__.py'>

    def test_box_pass_unexpected_argument(boxclass, teststack):
        testbox = boxclass()
        testbox.put('d', 10)
    
        @teststack.pass_('d')
        def fn(a, b):
            return a + b
    
        with teststack.push(testbox):
            with pytest.raises(TypeError) as excinfo:
                fn(1, 2)
    
>       assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
E       assert "test_box_pas... argument 'd'" == "fn() got an ... argument 'd'"
E         - fn() got an unexpected keyword argument 'd'
E         + test_box_pass_unexpected_argument.<locals>.fn() got an unexpected keyword argument 'd'

tests/test_stack.py:437: AssertionError
____________ test_box_pass_unexpected_argument[ChainBox-teststack0] ____________

boxclass = <class 'picobox._box.ChainBox'>, teststack = <Stack (0x7ffff64c56f0)>

    def test_box_pass_unexpected_argument(boxclass, teststack):
        testbox = boxclass()
        testbox.put('d', 10)
    
        @teststack.pass_('d')
        def fn(a, b):
            return a + b
    
        with teststack.push(testbox):
            with pytest.raises(TypeError) as excinfo:
                fn(1, 2)
    
>       assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
E       assert "test_box_pas... argument 'd'" == "fn() got an ... argument 'd'"
E         - fn() got an unexpected keyword argument 'd'
E         + test_box_pass_unexpected_argument.<locals>.fn() got an unexpected keyword argument 'd'

tests/test_stack.py:437: AssertionError
_____________ test_box_pass_unexpected_argument[ChainBox-picobox] ______________

boxclass = <class 'picobox._box.ChainBox'>
teststack = <module 'picobox' from '/nix/store/322w5r8nncx3yhms0aaslyf72pv0632d-python3.10-picobox-2.2.0/lib/python3.10/site-packages/picobox/__init__.py'>

    def test_box_pass_unexpected_argument(boxclass, teststack):
        testbox = boxclass()
        testbox.put('d', 10)
    
        @teststack.pass_('d')
        def fn(a, b):
            return a + b
    
        with teststack.push(testbox):
            with pytest.raises(TypeError) as excinfo:
                fn(1, 2)
    
>       assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
E       assert "test_box_pas... argument 'd'" == "fn() got an ... argument 'd'"
E         - fn() got an unexpected keyword argument 'd'
E         + test_box_pass_unexpected_argument.<locals>.fn() got an unexpected keyword argument 'd'

tests/test_stack.py:437: AssertionError
=============================== warnings summary ===============================
tests/test_scopes.py: 13 warnings
  /build/source/tests/test_scopes.py:61: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    coroutine_function = asyncio.coroutine(coroutine_function)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_box.py::test_box_pass_unexpected_argument[Box] - assert "te...
FAILED tests/test_box.py::test_box_pass_unexpected_argument[ChainBox] - asser...
FAILED tests/test_stack.py::test_box_pass_unexpected_argument[Box-teststack0]
FAILED tests/test_stack.py::test_box_pass_unexpected_argument[Box-picobox] - ...
FAILED tests/test_stack.py::test_box_pass_unexpected_argument[ChainBox-teststack0]
FAILED tests/test_stack.py::test_box_pass_unexpected_argument[ChainBox-picobox]
============ 6 failed, 1259 passed, 1 skipped, 13 warnings in 2.08s ============

The same tests pass with Python 3.9 without problems.

@flokli
Copy link
Author

flokli commented Aug 26, 2022

It looks like this already got fixed in #51, it's just that there's no release with these fixes yet?

@flokli flokli changed the title Test failures when building with Python 3.10 current release has test failures when building with Python 3.10 Aug 26, 2022
@ikalnytskyi
Copy link
Owner

Just made a release. Sorry for inconvenience.

flokli added a commit to flokli/nixpkgs that referenced this issue Apr 4, 2023
This brings python 3.11 support. Upstream also switched to pyproject and
hatch, which still needs SETUPTOOLS_SCM_PRETEND_VERSION to be set.

New release was reported in ikalnytskyi/picobox#55
@flokli
Copy link
Author

flokli commented Apr 4, 2023

Thanks for the ping! I updated our nixpkgs version in NixOS/nixpkgs#224665.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants