Kit Yan Choi added the comment:
Thank you for looking into this.
Yes, I agree it makes sense to have assertNoWarns for the same reason.
--
___
Python tracker
<https://bugs.python.org/issue39
Change by Kit Yan Choi :
--
keywords: +patch
pull_requests: +17459
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18067
___
Python tracker
<https://bugs.python.org/issu
New submission from Kit Yan Choi :
assertLogs is really useful (issue18937). Unfortunately it does not cover the
use cases where one wants to ensure no logs are emitted.
Similar to assertLogs, we can have a context manager for asserting no logs,
something like this?:
with assertNoLogs
Kit Yan Choi added the comment:
I think Python does differentiate "test error" and "test failure" such that a
test outcome state can be one of these: success, failure, error, skipped. One
could refine these to six: expected success, unexpected success, expected
failure
Kit Yan Choi added the comment:
Pining Chris based on previous discussion in issue16997 ... Hope that's okay.
I notice that the language in my initial message also conflates error and
failure. My apologies on the carelessness.
Just to clarify:
@unittest.expectedFailure
def
Change by Kit Yan Choi :
--
nosy: -Kit Choi
___
Python tracker
<https://bugs.python.org/issue38296>
___
___
Python-bugs-list mailing list
Unsubscribe:
Kit Yan Choi added the comment:
For your test:
class T(unittest.TestCase):
def test_f(self): raise TypeError()
If you run this test with unittest test runner, you should get this result:
E
==
ERROR: test_f (test_main.T
New submission from Kit Yan Choi:
Given a zipfile with the following content:
subdir/
file1.txt
subdir/file2.txt
>>> archive = ZipFile(file_path, "r")
>>> f = archive.open("subdir/", "r")
>>>f.read()
b''
It is