Roundup Robot added the comment:
New changeset 50e583f20d78 by Ethan Furman in branch 'default':
Close #18745: Improve enum tests in test_json for infinities and NaN.
http://hg.python.org/cpython/rev/50e583f20d78
--
nosy: +python-dev
resolution: - fixed
stage: patch review -
Eli Bendersky added the comment:
lgtm
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18745
___
___
Python-bugs-list mailing list
Unsubscribe:
Vajrasky Kok added the comment:
To test the infinity, negative infinity, and NaN (Not a Number), you named the
test as test_weird_floats. So implicitely, you admitted that they are floats
but just weird. Yet, you named the sample data test class as NotNum.
Implicitely, you were saying they
Ethan Furman added the comment:
From my layman's perspective they are all not numbers -- you can't add 5 to
any of them and get a number back that is 5
more than you started with.
By I have no problem with your proposed name -- I'll make the change.
--
Ethan Furman added the comment:
Fixed formatting in patch. ;)
--
Added file: http://bugs.python.org/file31541/issue18745.stoneleaf.02.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18745
Ethan Furman added the comment:
The added tests for inf, -inf, and nan are good.
The refactoring of the dictionary tests are not good. The reason is that
before _json.c was fixed (issue18264) it would return the string value of an
IntEnum instead of the string value of the IntEnum member's
Changes by Ethan Furman et...@stoneleaf.us:
--
assignee: - ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18745
___
___
Ethan Furman added the comment:
Tests look good to me.
--
nosy: +barry, eli.bendersky
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18745
___
New submission from Vajrasky Kok:
Test enum json in Lib/test/test_json/test_enum.py is ignorant of infinity
values. Also, NaN, but since NaN is a weirdo, let's not take that into account.
The unit test should represent of what will work in every case. For example:
def test_floats(self):