question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

5.3 changes plurality of keys in testdir.run().parseoutcomes()

See original GitHub issue

While testdir.run().parseoutcomes() used to give results such as {'warnings': 1} (plural) it now gives {'warning': 1} (singular). This broke the tests in pytest-twisted… and while I setup nightly ‘cron’ builds I apparently didn’t bother to notice when they broke awhile ago. :[ I do not know what the proper answer is here especially now that we have multiple versions out with each approach. Since pytest-twisted is still supporting py2, I don’t get to just update to latest pytest functionality across the board. Though yes, py2 support will at some point be dropped when the pain is sufficient.

I’ll just normalize the parseoutcomes() dict keys myself but wanted to document the change and see what opinions there are on it.

When pytest-twisted broke: last good pytest==5.2.4: https://travis-ci.org/pytest-dev/pytest-twisted/jobs/614201584 first bad pytest==5.3.0: https://travis-ci.org/pytest-dev/pytest-twisted/jobs/614718766

Introduced in #5989 and https://github.com/pytest-dev/pytest/commit/d863c30c743138ed29cdf786cb18c41c24983fe1.

There seems to be little testing being done on parseoutcomes(). https://github.com/pytest-dev/pytest/blob/e98176cf50c5b2d3df965ec409d7f62fefcd9ebd/testing/test_pytester.py#L687-L706 https://github.com/pytest-dev/pytest/blob/e98176cf50c5b2d3df965ec409d7f62fefcd9ebd/testing/test_capture.py#L1161-L1191

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
MarcoGorellicommented, Jan 19, 2020

Really sorry for the breakage I introduced with my issue / PR! Gonna be pretty busy for the next two weeks, but if this isn’t addressed by then I’ll take a look

0reactions
MarcoGorellicommented, Feb 4, 2020

@koscinskic sure, go ahead 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog — pytest documentation
issue #6505: Testdir.run().parseoutcomes() now always returns the parsed nouns in plural form. Originally parseoutcomes() would always returns the nouns in ...
Read more >
pytest Documentation - Read the Docs
test run reporting finishing. Note: Calling pytest.main() will result in importing your tests and any modules that they import. Due to the.
Read more >
pytest: Versions - Openbase
Full version history for pytest including change logs. ... #6505: Testdir.run().parseoutcomes() now always returns the parsed nouns in plural form.
Read more >
The pytest framework makes it easy to write small tests, yet ...
pytest-dev/pytest, The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found