Shreyan Avigyan <[email protected]> added the comment:
Here presumably the error is occurring somewhere near unittest. I've tested
this and wrote a minimal reproducible example.
```
import unittest
class TestingError(unittest.TestCase):
def test_negative_one(self):
with self.assertRaisesRegex(AssertionError, "xxxxx"):
self.assertEqual(1, 2)
```
Running this with `unittest discover` or in any other command-line way (like
-c) results in frame with -1 while running it from script (with unittest.main
probably) does not.
Hope this helps.
----------
nosy: +shreyanavigyan
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44297>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com