We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not getting the Captured stdout call logs
Test:
# test_subtest.py import unittest class PytestSubtestTest(unittest.TestCase): def test_subtest_stdout(self): for i in range(2): with self.subTest(i=i): print(f"{i}: Print something to stdout") self.assertEqual(0, 1)
Output:
$ pytest -o log_cli=true test_subtest.py ================================================================================ test session starts ================================================================================ platform darwin -- Python 3.7.7, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 rootdir: /Users/w.son/Projects/git.soma.salesforce.com/TESTS/presto-fit-tests/src/test/python plugins: subtests-0.3.1 collected 1 item test_subtest.py::PytestSubtestTest::test_subtest_stdout test_subtest.py::PytestSubtestTest::test_subtest_stdout PASSED [100%] ===================================================================================== FAILURES ====================================================================================== ____________________________________________________________________ PytestSubtestTest.test_subtest_stdout (i=0) ____________________________________________________________________ self = <test_subtest.PytestSubtestTest testMethod=test_subtest_stdout> def test_subtest_stdout(self): for i in range(2): with self.subTest(i=i): print(f"{i}: Print something to stdout") > self.assertEqual(0, 1) E AssertionError: 0 != 1 test_subtest.py:9: AssertionError ____________________________________________________________________ PytestSubtestTest.test_subtest_stdout (i=1) ____________________________________________________________________ self = <test_subtest.PytestSubtestTest testMethod=test_subtest_stdout> def test_subtest_stdout(self): for i in range(2): with self.subTest(i=i): print(f"{i}: Print something to stdout") > self.assertEqual(0, 1) E AssertionError: 0 != 1 test_subtest.py:9: AssertionError ============================================================================== short test summary info ============================================================================== FAILED test_subtest.py::PytestSubtestTest::test_subtest_stdout - AssertionError: 0 != 1 FAILED test_subtest.py::PytestSubtestTest::test_subtest_stdout - AssertionError: 0 != 1 ============================================================================ 2 failed, 1 passed in 0.11s ============================================================================
Originally posted by @dongwoo1005 in #18 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Not getting the Captured stdout call logs
Test:
Output:
Originally posted by @dongwoo1005 in #18 (comment)
The text was updated successfully, but these errors were encountered: