Closed python-mutation-testing closed 1 month ago
I'm sorry if this is not the case, but this looks like AI slop to me. Especially due to the changelog change, but also it doesn't test what it claims to test at all. Finally, the utc flag is in fact tested for the class that is actually formatting:
Hi, Sorry if it looked like a bot to you. I'm a researcher who developed a tool that performs mutation testing for Python projects, considering its dynamic features. My work has not yet been published, so my profile is like this; it should be anonymous for the review process. This pull request can help me prove my point in my paper.
About the test:
src/structlog/processors.py line 578
self.stamper = TimeStamper(fmt=fmt, utc=utc, key=key)
The utc argument is passed with a True default value, and it is never False (from the MaybeTimeStamper class). My mutation testing tool deleted the utc argument:
self.stamper = TimeStamper(fmt=fmt, key=key)
And the tests did not fail. I wrote that test to make up for it. Thanks for your time!
Summary
This is a test case to test the functionality of MaybeTimeStamper in cases where the UTC argument is false and the formatting is affected by that. This closes #661.
Pull Request Check List
main
branch – use a separate branch!api.py
.docs/api.rst
by hand.versionadded
,versionchanged
, ordeprecated
directives..rst
and.md
files is written using semantic newlines.