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.

Thanks for the plugin, subtests are properly named now. However…

After installing the plugin the whole section in the output showing the logs is gone (i.e the "Captured stdout call" and "Captured log call" that appear in the bottom without this plugin).

It’s very hard to debug failing tests without logs, making this plugin currently unusable for me.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
nicoddemuscommented, Jun 10, 2020

Thanks, created #26 as follow up, now the issue is clear! Sorry about the delay.

but why do I get 2 failed and 1 passed in the above instead of just 2 failures?

Because the test containing the subtests passed. This is to differentiate from the case where it also fails after the subTest call:

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)
        assert 0, "test failed" 

This will get you 3 failures: 2 from the subtests, and one from the failing assert after the subTest context-manager.

2reactions
nicoddemuscommented, Jan 23, 2020

0.3.0 has been released with this fix. 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Best No-Log VPN - Stay Anonymous & Secure - NordVPN
NordVPN keeps no logs of your internet activity. We don't track, collect, or share what you do online. Discover the best private VPN...
Read more >
What Is a No-Log VPN, and Why Is That Important for Privacy?
A no-logs policy is the cornerstone of a VPN service's promise to keep you anonymous. However, it comes with two major issues, both...
Read more >
No-log VPN: What is it, and does Norton Secure VPN keep logs?
A no-log VPN means that the virtual private network provider does not collect, or “log,” any information transmitted through the network.
Read more >
No-log VPN: What you do online is your business - Surfshark
No -log VPN for ultimate digital privacy · Make sure your ISP has no access to your browsing history · Secure your browsing...
Read more >
12 Best No-Log VPNs in 2022: Anonymous, Proven & Verified
Here Are the Best No-Log VPNs — Tested in December 2022. ExpressVPN — A trustworthy no-logs VPN with excellent security features, P2P-friendly ...
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