[New-bugs-announce] [issue45827] Unittest - commenting passing tests cause previous failing tests to pass

Jamie Chaisson report at bugs.python.org
Tue Nov 16 23:28:37 EST 2021


New submission from Jamie Chaisson <chaissoj at oregonstate.edu>:

Ubuntu Release 20.04.3 LTS (Focal Fossa) 64-bit
Using unittest, testing with assertEqual on int values and known good output. Unittest produces one-off error on handful of edge-case tests causing assert to fail. Commenting out passing assertEquals tests to isolate failing tests causes previous failing tests to pass (reproducible). All input values produce output values when testing by hand, only different when using unittest.

Pardon the homework. Removing the class and moving member variables into my_datetime function resolves the issue; however, the behavior as written should not be happening.

----------
components: Tests
files: tests.py
messages: 406449
nosy: nuse
priority: normal
severity: normal
status: open
title: Unittest - commenting passing tests cause previous failing tests to pass
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50446/tests.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45827>
_______________________________________


More information about the New-bugs-announce mailing list