New submission from Nikita Sobolev <m...@sobolevn.me>:
I've decided to test `typing.py` with `cosmic-ray` mutation testing framework. It identified 3 potential problems. Config: ``` [cosmic-ray] module-path = "Lib/typing.py" timeout = 15.0 excluded-modules = [] test-command = "./python.exe -m test -v test_typing --failfast" [cosmic-ray.distributor] name = "local" ``` Repro steps: 0. pip install cosmic-ray 1. Copy config above as `typing.toml` 2. cosmic-ray init typing.toml typing.sqlite 3. cosmic-ray exec tutorial.toml tutorial.sqlite Survived mutants: 1. ``` --- mutation diff --- --- aLib/typing.py +++ bLib/typing.py @@ -1103,7 +1103,7 @@ if Protocol in bases: return () i = bases.index(self) - for b in bases[i+1:]: + for b in bases[i*1:]: if isinstance(b, _BaseGenericAlias) and b is not self: return () return (self.__origin__,) ``` 2. ``` --- mutation diff --- --- aLib/typing.py +++ bLib/typing.py @@ -1103,7 +1103,7 @@ if Protocol in bases: return () i = bases.index(self) - for b in bases[i+1:]: + for b in bases[i//1:]: if isinstance(b, _BaseGenericAlias) and b is not self: return () return (self.__origin__,) ``` 3. ``` --- mutation diff --- --- aLib/typing.py +++ bLib/typing.py @@ -1103,7 +1103,7 @@ if Protocol in bases: return () i = bases.index(self) - for b in bases[i+1:]: + for b in bases[i**1:]: if isinstance(b, _BaseGenericAlias) and b is not self: return () return (self.__origin__,) ``` I've attached the full report to this issue if it is interesting to anyone: https://gist.github.com/sobolevn/79f1729dcf0b8c4b2a9bcee67027673a ---------- components: Tests messages: 405319 nosy: sobolevn priority: normal severity: normal status: open title: Mutation tests results of typing.py type: behavior versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45672> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com