Browse Source

tests/cpydiff: Remove types_int_tobytesfloat now that it doesn't fail.

Commit e269cabe3e added a check that the
first argument to the to_bytes() method is an integer, and now uPy
follows CPython behaviour and raises a TypeError for this test.

Note: CPython checks the argument types before checking the number of
arguments, but uPy does it the other way around, so they give different
exception messages for this test, but still the same type, a TypeError.
pull/3776/head
Damien George 7 years ago
parent
commit
2ada1124d4
  1. 10
      tests/cpydiff/types_int_tobytesfloat.py

10
tests/cpydiff/types_int_tobytesfloat.py

@ -1,10 +0,0 @@
"""
categories: Types,int
description: Incorrect error message when passing float into to_bytes
cause: Unknown
workaround: Unknown
"""
try:
int('1').to_bytes(1.0)
except TypeError as e:
print(e)
Loading…
Cancel
Save