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

pytester plugin is no longer rewritten #1920

Closed
RonnyPfannschmidt opened this issue Sep 7, 2016 · 2 comments
Closed

pytester plugin is no longer rewritten #1920

RonnyPfannschmidt opened this issue Sep 7, 2016 · 2 comments
Assignees
Milestone

Comments

@RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Sep 7, 2016

/home/ronny/Projects/pytest-dev/pytest/testing/python/metafunc.py:1395: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.pytester.HookRecorder instance at 0x7f85e2d9ea70>, passed = 1, skipped = 0, failed = 0

    def assertoutcome(self, passed=0, skipped=0, failed=0):
        realpassed, realskipped, realfailed = self.listoutcomes()
>       assert passed == len(realpassed)
E       AssertionError

/home/ronny/Projects/pytest-dev/pytest/_pytest/pytester.py:312: AssertionError
---------------------------------------------------------------------------------------------- Captured stdout call -----------------------------------------------------------------------------------------------
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.1.0.dev0, py-1.4.31, pluggy-0.3.1
rootdir: /tmp/pytest-of-ronny/pytest-124/testdir/test_parametrize_marked_value1, inifile: 
plugins: hypothesis-3.4.2
collected 2 items

test_parametrize_marked_value.py XX

@RonnyPfannschmidt RonnyPfannschmidt added this to the 3.1 milestone Sep 7, 2016
@RonnyPfannschmidt
Copy link
Member Author

@RonnyPfannschmidt RonnyPfannschmidt commented Jan 19, 2017

@nicoddemus isnt that one fixed by the handling of pytest_plugins you added ?

@nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Jan 19, 2017

Strange, it is still not working as of 3.0.5:

pytest_plugins = ['pytester']


def test(testdir):
    testdir.makepyfile('def test(): assert 0')
    r = testdir.inline_run()
    r.assertoutcome(passed=1)

And doesn't print any warnings either...

@nicoddemus nicoddemus self-assigned this Jan 19, 2017
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jan 19, 2017
RonnyPfannschmidt added a commit that referenced this issue Jan 20, 2017
Assert statements of the pytester plugin again benefit from assertion rewriting

fixes #1920
This was referenced Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants