pytest-subtests icon indicating copy to clipboard operation
pytest-subtests copied to clipboard

unittest subTest() support and subtests fixture

Results 27 pytest-subtests issues
Sort by recently updated
recently updated
newest added
trafficstars

I have two problems here and not sure if I misunderstand the purpose of pytest-subtests or if there really is a bug. I have a unittest like this ``` expect_folder...

One more test case that is interesting. This file: ```python import unittest class T(unittest.TestCase): def test_fail(self): with self.subTest(): self.assertEqual(1, 2) ``` No passing subtests, just one failure. Still shows PASSED....

Captured stdout for a subtest is not displayed when the `--capture` option value is `fd` or `sys`. It is displayed as expected when the value is `tee-sys`. This causes `pytest-html`...

It would be nice if it was possible to keep track of the tests that were passed or that all subtests either passed or not. For example: ```Python import pytest...

Like what `pytest -k ` does, but on subtest level.

question

Because pytest don't support subtests I have to use this addon here. I'm not sure if I do something wrong? In short: Using a `pathlib.Path` object as argument in `unittest.subTest()`...

`coverage.py` supports a [notion of "dynamic contexts"](https://coverage.readthedocs.io/en/7.2.6/contexts.html#dynamic-contexts). The most common reason for these is answering "what tests cover a particular line" in the coverage output -- but right now that...

I am running the subtests example from the documentation: ``` def test_foo(subtests): for i in range(5): with subtests.test(msg="custom", i=i): assert i % 2 == 0 ``` I am running the...

I believe it should have 2023 year https://github.com/pytest-dev/pytest-subtests/blob/85cb300c915b4da50612f3df72551c44d43cd620/CHANGELOG.rst?plain=1#L4 I'm not sure if changelog is auto-generated using some tooling or done by hand, so filing an issue rather then opening PR...

(I recommend copy-pasting the XML content from this issue into files, and then opening those in a web-browser. The tags nesting will be much more apparent.) Take this code: ```python...