Code Monkey home page Code Monkey logo

Comments (7)

Tinche avatar Tinche commented on May 12, 2024

I don't have access to a desktop computer right now but I think I might know what's causing this. Thanks for reporting, will look into it asap.

from pytest-asyncio.

Tinche avatar Tinche commented on May 12, 2024

If I'm right the test is being executed (you can verify with a print inside and running pytest with -s), just the assert exceptions are being swallowed. 😕

from pytest-asyncio.

catlee avatar catlee commented on May 12, 2024

Yes, you're right. Here's the updated code:

import pytest

@pytest.mark.asyncio
async def test_foo():
    print('hello')
    assert False
    print('world')

And the output from py.test test_foo.py -s -v:

===================================================== test session starts =====================================================
platform linux -- Python 3.5.1+, pytest-2.9.2, py-1.4.31, pluggy-0.3.1 -- /home/catlee/test/pytest-async/bin/python3.5
cachedir: .cache
rootdir: /home/catlee/test/pytest-async, inifile: 
plugins: asyncio-0.4.0
collected 1 items 

test_foo.py::test_foo hello
PASSED

from pytest-asyncio.

Tinche avatar Tinche commented on May 12, 2024

Will be fixed tomorrow 👍 Thanks!

from pytest-asyncio.

Tinche avatar Tinche commented on May 12, 2024

Hi, I've just pushed 0.4.1 to PyPI. Can you confirm it fixes the issue for you?

from pytest-asyncio.

catlee avatar catlee commented on May 12, 2024

Yes, 0.4.1 works, thanks!

from pytest-asyncio.

Tinche avatar Tinche commented on May 12, 2024

Great :)

from pytest-asyncio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.