Skip to content

Instantly share code, notes, and snippets.

@alisianoi
Created June 21, 2017 14:49
Show Gist options
  • Save alisianoi/66c40eccf3a0abf556f9dc356bab3be4 to your computer and use it in GitHub Desktop.
Save alisianoi/66c40eccf3a0abf556f9dc356bab3be4 to your computer and use it in GitHub Desktop.
======================================================================
FAIL: test_basic (tests.datatypes.test_str.FormatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 201, in wrapper
res = function(self, js_cleaner, py_cleaner, *args, **kwargs)
File "/home/alex/Code/batavia/tests/datatypes/test_str.py", line 709, in test_basic
self.assertCodeExecution(tests, js_cleaner = js_cleaner, py_cleaner = py_cleaner)
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [577 chars]% 5e-06\nformat this: 0\nDone.\n>>> "format th[38329 chars]e.\n' != '>>> [577 chars]% 5e-6\nformat this: 0\nDone.\n>>> "format thi[39847 chars]e.\n'
>>> "format this: %#d" % "s"
%d format: a number is required, not str
Done.
>>> "format this: %#d" % "spam"
%d format: a number is required, not str
Done.
>>> "format this: %#d" % "5"
%d format: a number is required, not str
Done.
>>> "format this: %#d" % 5
format this: 5
Done.
>>> "format this: %#d" % -5
format this: -5
Done.
>>> "format this: %#d" % 5.0
format this: 5
Done.
>>> "format this: %#d" % -5.0
format this: -5
Done.
>>> "format this: %#d" % 0.5
format this: 0
Done.
>>> "format this: %#d" % 0.5
format this: 0
Done.
- >>> "format this: %#d" % 5e-06
? -
+ >>> "format this: %#d" % 5e-6
format this: 0
Done.
>>> "format this: %#d" % 5e-21
format this: 0
Done.
>>> "format this: %#d" % -0.5
format this: 0
Done.
- >>> "format this: %#d" % -5e-06
? -
+ >>> "format this: %#d" % -5e-6
format this: 0
Done.
>>> "format this: %#d" % -5e-21
format this: 0
Done.
>>> "format this: %#d" % 500000
format this: 500000
Done.
>>> "format this: %#d" % -500000
format this: -500000
Done.
>>> "format this: %#d" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %#d" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %#d" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#d" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#i" % "s"
%i format: a number is required, not str
Done.
>>> "format this: %#i" % "spam"
%i format: a number is required, not str
Done.
>>> "format this: %#i" % "5"
%i format: a number is required, not str
Done.
>>> "format this: %#i" % 5
format this: 5
Done.
>>> "format this: %#i" % -5
format this: -5
Done.
>>> "format this: %#i" % 5.0
format this: 5
Done.
>>> "format this: %#i" % -5.0
format this: -5
Done.
>>> "format this: %#i" % 0.5
format this: 0
Done.
>>> "format this: %#i" % 0.5
format this: 0
Done.
- >>> "format this: %#i" % 5e-06
? -
+ >>> "format this: %#i" % 5e-6
format this: 0
Done.
>>> "format this: %#i" % 5e-21
format this: 0
Done.
>>> "format this: %#i" % -0.5
format this: 0
Done.
- >>> "format this: %#i" % -5e-06
? -
+ >>> "format this: %#i" % -5e-6
format this: 0
Done.
>>> "format this: %#i" % -5e-21
format this: 0
Done.
>>> "format this: %#i" % 500000
format this: 500000
Done.
>>> "format this: %#i" % -500000
format this: -500000
Done.
>>> "format this: %#i" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %#i" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %#i" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#i" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#o" % "s"
- %o format: a number is required, not str
? - ^^^
+ %o format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#o" % "spam"
- %o format: a number is required, not str
? - ^^^
+ %o format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#o" % "5"
- %o format: a number is required, not str
? - ^^^
+ %o format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#o" % 5
format this: 0o5
Done.
>>> "format this: %#o" % -5
format this: -0o5
Done.
>>> "format this: %#o" % 5.0
- format this: 0o5
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % -5.0
- format this: -0o5
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % 0.5
- format this: 0o0
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % 0.5
- format this: 0o0
+ %o format: an integer is required, not float
Done.
- >>> "format this: %#o" % 5e-06
? -
+ >>> "format this: %#o" % 5e-6
- format this: 0o0
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % 5e-21
- format this: 0o0
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % -0.5
- format this: 0o0
+ %o format: an integer is required, not float
Done.
- >>> "format this: %#o" % -5e-06
? -
+ >>> "format this: %#o" % -5e-6
- format this: 0o0
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % -5e-21
- format this: 0o0
+ %o format: an integer is required, not float
Done.
>>> "format this: %#o" % 500000
format this: 0o1720440
Done.
>>> "format this: %#o" % -500000
format this: -0o1720440
Done.
>>> "format this: %#o" % 500000000000000000000
format this: 0o66153446556135724000000
Done.
>>> "format this: %#o" % -500000000000000000000
format this: -0o66153446556135724000000
Done.
>>> "format this: %#o" % 1361129467683753853853498429727072845824
format this: 0o20000000000000000000000000000000000000000000
Done.
>>> "format this: %#o" % 1361129467683753853853498429727072845824
format this: 0o20000000000000000000000000000000000000000000
Done.
>>> "format this: %#u" % "s"
%u format: a number is required, not str
Done.
>>> "format this: %#u" % "spam"
%u format: a number is required, not str
Done.
>>> "format this: %#u" % "5"
%u format: a number is required, not str
Done.
>>> "format this: %#u" % 5
format this: 5
Done.
>>> "format this: %#u" % -5
format this: -5
Done.
>>> "format this: %#u" % 5.0
format this: 5
Done.
>>> "format this: %#u" % -5.0
format this: -5
Done.
>>> "format this: %#u" % 0.5
format this: 0
Done.
>>> "format this: %#u" % 0.5
format this: 0
Done.
- >>> "format this: %#u" % 5e-06
? -
+ >>> "format this: %#u" % 5e-6
format this: 0
Done.
>>> "format this: %#u" % 5e-21
format this: 0
Done.
>>> "format this: %#u" % -0.5
format this: 0
Done.
- >>> "format this: %#u" % -5e-06
? -
+ >>> "format this: %#u" % -5e-6
format this: 0
Done.
>>> "format this: %#u" % -5e-21
format this: 0
Done.
>>> "format this: %#u" % 500000
format this: 500000
Done.
>>> "format this: %#u" % -500000
format this: -500000
Done.
>>> "format this: %#u" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %#u" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %#u" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#u" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#x" % "s"
- %x format: a number is required, not str
? - ^^^
+ %x format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#x" % "spam"
- %x format: a number is required, not str
? - ^^^
+ %x format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#x" % "5"
- %x format: a number is required, not str
? - ^^^
+ %x format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#x" % 5
format this: 0x5
Done.
>>> "format this: %#x" % -5
format this: -0x5
Done.
>>> "format this: %#x" % 5.0
- format this: 0x5
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % -5.0
- format this: -0x5
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % 0.5
- format this: 0x0
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % 0.5
- format this: 0x0
+ %x format: an integer is required, not float
Done.
- >>> "format this: %#x" % 5e-06
? -
+ >>> "format this: %#x" % 5e-6
- format this: 0x0
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % 5e-21
- format this: 0x0
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % -0.5
- format this: 0x0
+ %x format: an integer is required, not float
Done.
- >>> "format this: %#x" % -5e-06
? -
+ >>> "format this: %#x" % -5e-6
- format this: 0x0
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % -5e-21
- format this: 0x0
+ %x format: an integer is required, not float
Done.
>>> "format this: %#x" % 500000
format this: 0x7a120
Done.
>>> "format this: %#x" % -500000
format this: -0x7a120
Done.
>>> "format this: %#x" % 500000000000000000000
format this: 0x1b1ae4d6e2ef500000
Done.
>>> "format this: %#x" % -500000000000000000000
format this: -0x1b1ae4d6e2ef500000
Done.
>>> "format this: %#x" % 1361129467683753853853498429727072845824
format this: 0x400000000000000000000000000000000
Done.
>>> "format this: %#x" % 1361129467683753853853498429727072845824
format this: 0x400000000000000000000000000000000
Done.
>>> "format this: %#X" % "s"
- %X format: a number is required, not str
? - ^^^
+ %X format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#X" % "spam"
- %X format: a number is required, not str
? - ^^^
+ %X format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#X" % "5"
- %X format: a number is required, not str
? - ^^^
+ %X format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %#X" % 5
format this: 0X5
Done.
>>> "format this: %#X" % -5
format this: -0X5
Done.
>>> "format this: %#X" % 5.0
- format this: 0X5
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % -5.0
- format this: -0X5
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % 0.5
- format this: 0X0
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % 0.5
- format this: 0X0
+ %X format: an integer is required, not float
Done.
- >>> "format this: %#X" % 5e-06
? -
+ >>> "format this: %#X" % 5e-6
- format this: 0X0
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % 5e-21
- format this: 0X0
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % -0.5
- format this: 0X0
+ %X format: an integer is required, not float
Done.
- >>> "format this: %#X" % -5e-06
? -
+ >>> "format this: %#X" % -5e-6
- format this: 0X0
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % -5e-21
- format this: 0X0
+ %X format: an integer is required, not float
Done.
>>> "format this: %#X" % 500000
format this: 0X7A120
Done.
>>> "format this: %#X" % -500000
format this: -0X7A120
Done.
>>> "format this: %#X" % 500000000000000000000
format this: 0X1B1AE4D6E2EF500000
Done.
>>> "format this: %#X" % -500000000000000000000
format this: -0X1B1AE4D6E2EF500000
Done.
>>> "format this: %#X" % 1361129467683753853853498429727072845824
format this: 0X400000000000000000000000000000000
Done.
>>> "format this: %#X" % 1361129467683753853853498429727072845824
format this: 0X400000000000000000000000000000000
Done.
>>> "format this: %#e" % "s"
a float is required
Done.
>>> "format this: %#e" % "spam"
a float is required
Done.
>>> "format this: %#e" % "5"
a float is required
Done.
>>> "format this: %#e" % 5
format this: 5.00000...e+00
Done.
>>> "format this: %#e" % -5
format this: -5.00000...e+00
Done.
>>> "format this: %#e" % 5.0
format this: 5.00000...e+00
Done.
>>> "format this: %#e" % -5.0
format this: -5.00000...e+00
Done.
>>> "format this: %#e" % 0.5
- format this: 5.00000...e-01
? -
+ format this: 5.00000...e-1
Done.
>>> "format this: %#e" % 0.5
- format this: 5.00000...e-01
? -
+ format this: 5.00000...e-1
Done.
- >>> "format this: %#e" % 5e-06
? -
+ >>> "format this: %#e" % 5e-6
- format this: 5.00000...e-06
? -
+ format this: 5.00000...e-6
Done.
>>> "format this: %#e" % 5e-21
format this: 5.00000...e-21
Done.
>>> "format this: %#e" % -0.5
- format this: -5.00000...e-01
? -
+ format this: -5.00000...e-1
Done.
- >>> "format this: %#e" % -5e-06
? -
+ >>> "format this: %#e" % -5e-6
- format this: -5.00000...e-06
? -
+ format this: -5.00000...e-6
Done.
>>> "format this: %#e" % -5e-21
format this: -5.00000...e-21
Done.
>>> "format this: %#e" % 500000
format this: 5.00000...e+05
Done.
>>> "format this: %#e" % -500000
format this: -5.00000...e+05
Done.
>>> "format this: %#e" % 500000000000000000000
format this: 5.00000...e+20
Done.
>>> "format this: %#e" % -500000000000000000000
format this: -5.00000...e+20
Done.
>>> "format this: %#e" % 1361129467683753853853498429727072845824
format this: 1.36112...e+39
Done.
>>> "format this: %#e" % 1361129467683753853853498429727072845824
format this: 1.36112...e+39
Done.
>>> "format this: %#E" % "s"
a float is required
Done.
>>> "format this: %#E" % "spam"
a float is required
Done.
>>> "format this: %#E" % "5"
a float is required
Done.
>>> "format this: %#E" % 5
format this: 5.00000...E+00
Done.
>>> "format this: %#E" % -5
format this: -5.00000...E+00
Done.
>>> "format this: %#E" % 5.0
format this: 5.00000...E+00
Done.
>>> "format this: %#E" % -5.0
format this: -5.00000...E+00
Done.
>>> "format this: %#E" % 0.5
format this: 5.00000...E-01
Done.
>>> "format this: %#E" % 0.5
format this: 5.00000...E-01
Done.
- >>> "format this: %#E" % 5e-06
? -
+ >>> "format this: %#E" % 5e-6
format this: 5.00000...E-06
Done.
>>> "format this: %#E" % 5e-21
format this: 5.00000...E-21
Done.
>>> "format this: %#E" % -0.5
format this: -5.00000...E-01
Done.
- >>> "format this: %#E" % -5e-06
? -
+ >>> "format this: %#E" % -5e-6
format this: -5.00000...E-06
Done.
>>> "format this: %#E" % -5e-21
format this: -5.00000...E-21
Done.
>>> "format this: %#E" % 500000
format this: 5.00000...E+05
Done.
>>> "format this: %#E" % -500000
format this: -5.00000...E+05
Done.
>>> "format this: %#E" % 500000000000000000000
format this: 5.00000...E+20
Done.
>>> "format this: %#E" % -500000000000000000000
format this: -5.00000...E+20
Done.
>>> "format this: %#E" % 1361129467683753853853498429727072845824
format this: 1.36112...E+39
Done.
>>> "format this: %#E" % 1361129467683753853853498429727072845824
format this: 1.36112...E+39
Done.
>>> "format this: %#f" % "s"
a float is required
Done.
>>> "format this: %#f" % "spam"
a float is required
Done.
>>> "format this: %#f" % "5"
a float is required
Done.
>>> "format this: %#f" % 5
format this: 5.00000...
Done.
>>> "format this: %#f" % -5
format this: -5.00000...
Done.
>>> "format this: %#f" % 5.0
format this: 5.00000...
Done.
>>> "format this: %#f" % -5.0
format this: -5.00000...
Done.
>>> "format this: %#f" % 0.5
format this: 0.50000...
Done.
>>> "format this: %#f" % 0.5
format this: 0.50000...
Done.
- >>> "format this: %#f" % 5e-06
? -
+ >>> "format this: %#f" % 5e-6
format this: 0.00000...
Done.
>>> "format this: %#f" % 5e-21
format this: 0.00000...
Done.
>>> "format this: %#f" % -0.5
format this: -0.50000...
Done.
- >>> "format this: %#f" % -5e-06
? -
+ >>> "format this: %#f" % -5e-6
format this: -0.00000...
Done.
>>> "format this: %#f" % -5e-21
format this: -0.00000...
Done.
>>> "format this: %#f" % 500000
format this: 500000.00000...
Done.
>>> "format this: %#f" % -500000
format this: -500000.00000...
Done.
>>> "format this: %#f" % 500000000000000000000
format this: 500000000000000000000.00000...
Done.
>>> "format this: %#f" % -500000000000000000000
format this: -500000000000000000000.00000...
Done.
>>> "format this: %#f" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %#f" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %#F" % "s"
a float is required
Done.
>>> "format this: %#F" % "spam"
a float is required
Done.
>>> "format this: %#F" % "5"
a float is required
Done.
>>> "format this: %#F" % 5
format this: 5.00000...
Done.
>>> "format this: %#F" % -5
format this: -5.00000...
Done.
>>> "format this: %#F" % 5.0
format this: 5.00000...
Done.
>>> "format this: %#F" % -5.0
format this: -5.00000...
Done.
>>> "format this: %#F" % 0.5
format this: 0.50000...
Done.
>>> "format this: %#F" % 0.5
format this: 0.50000...
Done.
- >>> "format this: %#F" % 5e-06
? -
+ >>> "format this: %#F" % 5e-6
format this: 0.00000...
Done.
>>> "format this: %#F" % 5e-21
format this: 0.00000...
Done.
>>> "format this: %#F" % -0.5
format this: -0.50000...
Done.
- >>> "format this: %#F" % -5e-06
? -
+ >>> "format this: %#F" % -5e-6
format this: -0.00000...
Done.
>>> "format this: %#F" % -5e-21
format this: -0.00000...
Done.
>>> "format this: %#F" % 500000
format this: 500000.00000...
Done.
>>> "format this: %#F" % -500000
format this: -500000.00000...
Done.
>>> "format this: %#F" % 500000000000000000000
format this: 500000000000000000000.00000...
Done.
>>> "format this: %#F" % -500000000000000000000
format this: -500000000000000000000.00000...
Done.
>>> "format this: %#F" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %#F" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %#g" % "s"
a float is required
Done.
>>> "format this: %#g" % "spam"
a float is required
Done.
>>> "format this: %#g" % "5"
a float is required
Done.
>>> "format this: %#g" % 5
format this: 5.00000
Done.
>>> "format this: %#g" % -5
format this: -5.00000
Done.
>>> "format this: %#g" % 5.0
format this: 5.00000
Done.
>>> "format this: %#g" % -5.0
format this: -5.00000
Done.
>>> "format this: %#g" % 0.5
format this: 0.50000...
Done.
>>> "format this: %#g" % 0.5
format this: 0.50000...
Done.
- >>> "format this: %#g" % 5e-06
? -
+ >>> "format this: %#g" % 5e-6
- format this: 5.00000e-06
? -
+ format this: 5.00000e-6
Done.
>>> "format this: %#g" % 5e-21
format this: 5.00000e-21
Done.
>>> "format this: %#g" % -0.5
format this: -0.50000...
Done.
- >>> "format this: %#g" % -5e-06
? -
+ >>> "format this: %#g" % -5e-6
- format this: -5.00000e-06
? -
+ format this: -5.00000e-6
Done.
>>> "format this: %#g" % -5e-21
format this: -5.00000e-21
Done.
>>> "format this: %#g" % 500000
format this: 500000.
Done.
>>> "format this: %#g" % -500000
format this: -500000.
Done.
>>> "format this: %#g" % 500000000000000000000
format this: 5.00000e+20
Done.
>>> "format this: %#g" % -500000000000000000000
format this: -5.00000e+20
Done.
>>> "format this: %#g" % 1361129467683753853853498429727072845824
format this: 1.36113e+39
Done.
>>> "format this: %#g" % 1361129467683753853853498429727072845824
format this: 1.36113e+39
Done.
>>> "format this: %#G" % "s"
a float is required
Done.
>>> "format this: %#G" % "spam"
a float is required
Done.
>>> "format this: %#G" % "5"
a float is required
Done.
>>> "format this: %#G" % 5
format this: 5.00000
Done.
>>> "format this: %#G" % -5
format this: -5.00000
Done.
>>> "format this: %#G" % 5.0
format this: 5.00000
Done.
>>> "format this: %#G" % -5.0
format this: -5.00000
Done.
>>> "format this: %#G" % 0.5
format this: 0.50000...
Done.
>>> "format this: %#G" % 0.5
format this: 0.50000...
Done.
- >>> "format this: %#G" % 5e-06
? -
+ >>> "format this: %#G" % 5e-6
format this: 5.00000E-06
Done.
>>> "format this: %#G" % 5e-21
format this: 5.00000E-21
Done.
>>> "format this: %#G" % -0.5
format this: -0.50000...
Done.
- >>> "format this: %#G" % -5e-06
? -
+ >>> "format this: %#G" % -5e-6
format this: -5.00000E-06
Done.
>>> "format this: %#G" % -5e-21
format this: -5.00000E-21
Done.
>>> "format this: %#G" % 500000
format this: 500000.
Done.
>>> "format this: %#G" % -500000
format this: -500000.
Done.
>>> "format this: %#G" % 500000000000000000000
format this: 5.00000E+20
Done.
>>> "format this: %#G" % -500000000000000000000
format this: -5.00000E+20
Done.
>>> "format this: %#G" % 1361129467683753853853498429727072845824
format this: 1.36113E+39
Done.
>>> "format this: %#G" % 1361129467683753853853498429727072845824
format this: 1.36113E+39
Done.
>>> "format this: %#r" % "s"
format this: 's'
Done.
>>> "format this: %#r" % "spam"
format this: 'spam'
Done.
>>> "format this: %#r" % "5"
format this: '5'
Done.
>>> "format this: %#r" % 5
format this: 5
Done.
>>> "format this: %#r" % -5
format this: -5
Done.
>>> "format this: %#r" % 5.0
format this: 5.0
Done.
>>> "format this: %#r" % -5.0
format this: -5.0
Done.
>>> "format this: %#r" % 0.5
format this: 0.5
Done.
>>> "format this: %#r" % 0.5
format this: 0.5
Done.
- >>> "format this: %#r" % 5e-06
? -
+ >>> "format this: %#r" % 5e-6
- format this: 5e-06
? -
+ format this: 5e-6
Done.
>>> "format this: %#r" % 5e-21
format this: 5e-21
Done.
>>> "format this: %#r" % -0.5
format this: -0.5
Done.
- >>> "format this: %#r" % -5e-06
? -
+ >>> "format this: %#r" % -5e-6
- format this: -5e-06
? -
+ format this: -5e-6
Done.
>>> "format this: %#r" % -5e-21
format this: -5e-21
Done.
>>> "format this: %#r" % 500000
format this: 500000
Done.
>>> "format this: %#r" % -500000
format this: -500000
Done.
>>> "format this: %#r" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %#r" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %#r" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#r" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#s" % "s"
format this: s
Done.
>>> "format this: %#s" % "spam"
format this: spam
Done.
>>> "format this: %#s" % "5"
format this: 5
Done.
>>> "format this: %#s" % 5
format this: 5
Done.
>>> "format this: %#s" % -5
format this: -5
Done.
>>> "format this: %#s" % 5.0
format this: 5.0
Done.
>>> "format this: %#s" % -5.0
format this: -5.0
Done.
>>> "format this: %#s" % 0.5
format this: 0.5
Done.
>>> "format this: %#s" % 0.5
format this: 0.5
Done.
- >>> "format this: %#s" % 5e-06
? -
+ >>> "format this: %#s" % 5e-6
- format this: 5e-06
? -
+ format this: 5e-6
Done.
>>> "format this: %#s" % 5e-21
format this: 5e-21
Done.
>>> "format this: %#s" % -0.5
format this: -0.5
Done.
- >>> "format this: %#s" % -5e-06
? -
+ >>> "format this: %#s" % -5e-6
- format this: -5e-06
? -
+ format this: -5e-6
Done.
>>> "format this: %#s" % -5e-21
format this: -5e-21
Done.
>>> "format this: %#s" % 500000
format this: 500000
Done.
>>> "format this: %#s" % -500000
format this: -500000
Done.
>>> "format this: %#s" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %#s" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %#s" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %#s" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %d" % "s"
%d format: a number is required, not str
Done.
>>> "format this: %d" % "spam"
%d format: a number is required, not str
Done.
>>> "format this: %d" % "5"
%d format: a number is required, not str
Done.
>>> "format this: %d" % 5
format this: 5
Done.
>>> "format this: %d" % -5
format this: -5
Done.
>>> "format this: %d" % 5.0
format this: 5
Done.
>>> "format this: %d" % -5.0
format this: -5
Done.
>>> "format this: %d" % 0.5
format this: 0
Done.
>>> "format this: %d" % 0.5
format this: 0
Done.
- >>> "format this: %d" % 5e-06
? -
+ >>> "format this: %d" % 5e-6
format this: 0
Done.
>>> "format this: %d" % 5e-21
format this: 0
Done.
>>> "format this: %d" % -0.5
format this: 0
Done.
- >>> "format this: %d" % -5e-06
? -
+ >>> "format this: %d" % -5e-6
format this: 0
Done.
>>> "format this: %d" % -5e-21
format this: 0
Done.
>>> "format this: %d" % 500000
format this: 500000
Done.
>>> "format this: %d" % -500000
format this: -500000
Done.
>>> "format this: %d" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %d" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %d" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %d" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %i" % "s"
%i format: a number is required, not str
Done.
>>> "format this: %i" % "spam"
%i format: a number is required, not str
Done.
>>> "format this: %i" % "5"
%i format: a number is required, not str
Done.
>>> "format this: %i" % 5
format this: 5
Done.
>>> "format this: %i" % -5
format this: -5
Done.
>>> "format this: %i" % 5.0
format this: 5
Done.
>>> "format this: %i" % -5.0
format this: -5
Done.
>>> "format this: %i" % 0.5
format this: 0
Done.
>>> "format this: %i" % 0.5
format this: 0
Done.
- >>> "format this: %i" % 5e-06
? -
+ >>> "format this: %i" % 5e-6
format this: 0
Done.
>>> "format this: %i" % 5e-21
format this: 0
Done.
>>> "format this: %i" % -0.5
format this: 0
Done.
- >>> "format this: %i" % -5e-06
? -
+ >>> "format this: %i" % -5e-6
format this: 0
Done.
>>> "format this: %i" % -5e-21
format this: 0
Done.
>>> "format this: %i" % 500000
format this: 500000
Done.
>>> "format this: %i" % -500000
format this: -500000
Done.
>>> "format this: %i" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %i" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %i" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %i" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %o" % "s"
- %o format: a number is required, not str
? - ^^^
+ %o format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %o" % "spam"
- %o format: a number is required, not str
? - ^^^
+ %o format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %o" % "5"
- %o format: a number is required, not str
? - ^^^
+ %o format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %o" % 5
format this: 5
Done.
>>> "format this: %o" % -5
format this: -5
Done.
>>> "format this: %o" % 5.0
- format this: 5
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % -5.0
- format this: -5
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % 0.5
- format this: 0
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % 0.5
- format this: 0
+ %o format: an integer is required, not float
Done.
- >>> "format this: %o" % 5e-06
? -
+ >>> "format this: %o" % 5e-6
- format this: 0
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % 5e-21
- format this: 0
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % -0.5
- format this: 0
+ %o format: an integer is required, not float
Done.
- >>> "format this: %o" % -5e-06
? -
+ >>> "format this: %o" % -5e-6
- format this: 0
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % -5e-21
- format this: 0
+ %o format: an integer is required, not float
Done.
>>> "format this: %o" % 500000
format this: 1720440
Done.
>>> "format this: %o" % -500000
format this: -1720440
Done.
>>> "format this: %o" % 500000000000000000000
format this: 66153446556135724000000
Done.
>>> "format this: %o" % -500000000000000000000
format this: -66153446556135724000000
Done.
>>> "format this: %o" % 1361129467683753853853498429727072845824
format this: 20000000000000000000000000000000000000000000
Done.
>>> "format this: %o" % 1361129467683753853853498429727072845824
format this: 20000000000000000000000000000000000000000000
Done.
>>> "format this: %u" % "s"
%u format: a number is required, not str
Done.
>>> "format this: %u" % "spam"
%u format: a number is required, not str
Done.
>>> "format this: %u" % "5"
%u format: a number is required, not str
Done.
>>> "format this: %u" % 5
format this: 5
Done.
>>> "format this: %u" % -5
format this: -5
Done.
>>> "format this: %u" % 5.0
format this: 5
Done.
>>> "format this: %u" % -5.0
format this: -5
Done.
>>> "format this: %u" % 0.5
format this: 0
Done.
>>> "format this: %u" % 0.5
format this: 0
Done.
- >>> "format this: %u" % 5e-06
? -
+ >>> "format this: %u" % 5e-6
format this: 0
Done.
>>> "format this: %u" % 5e-21
format this: 0
Done.
>>> "format this: %u" % -0.5
format this: 0
Done.
- >>> "format this: %u" % -5e-06
? -
+ >>> "format this: %u" % -5e-6
format this: 0
Done.
>>> "format this: %u" % -5e-21
format this: 0
Done.
>>> "format this: %u" % 500000
format this: 500000
Done.
>>> "format this: %u" % -500000
format this: -500000
Done.
>>> "format this: %u" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %u" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %u" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %u" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %x" % "s"
- %x format: a number is required, not str
? - ^^^
+ %x format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %x" % "spam"
- %x format: a number is required, not str
? - ^^^
+ %x format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %x" % "5"
- %x format: a number is required, not str
? - ^^^
+ %x format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %x" % 5
format this: 5
Done.
>>> "format this: %x" % -5
format this: -5
Done.
>>> "format this: %x" % 5.0
- format this: 5
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % -5.0
- format this: -5
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % 0.5
- format this: 0
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % 0.5
- format this: 0
+ %x format: an integer is required, not float
Done.
- >>> "format this: %x" % 5e-06
? -
+ >>> "format this: %x" % 5e-6
- format this: 0
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % 5e-21
- format this: 0
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % -0.5
- format this: 0
+ %x format: an integer is required, not float
Done.
- >>> "format this: %x" % -5e-06
? -
+ >>> "format this: %x" % -5e-6
- format this: 0
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % -5e-21
- format this: 0
+ %x format: an integer is required, not float
Done.
>>> "format this: %x" % 500000
format this: 7a120
Done.
>>> "format this: %x" % -500000
format this: -7a120
Done.
>>> "format this: %x" % 500000000000000000000
format this: 1b1ae4d6e2ef500000
Done.
>>> "format this: %x" % -500000000000000000000
format this: -1b1ae4d6e2ef500000
Done.
>>> "format this: %x" % 1361129467683753853853498429727072845824
format this: 400000000000000000000000000000000
Done.
>>> "format this: %x" % 1361129467683753853853498429727072845824
format this: 400000000000000000000000000000000
Done.
>>> "format this: %X" % "s"
- %X format: a number is required, not str
? - ^^^
+ %X format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %X" % "spam"
- %X format: a number is required, not str
? - ^^^
+ %X format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %X" % "5"
- %X format: a number is required, not str
? - ^^^
+ %X format: an integer is required, not str
? ^^^^^^
Done.
>>> "format this: %X" % 5
format this: 5
Done.
>>> "format this: %X" % -5
format this: -5
Done.
>>> "format this: %X" % 5.0
- format this: 5
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % -5.0
- format this: -5
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % 0.5
- format this: 0
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % 0.5
- format this: 0
+ %X format: an integer is required, not float
Done.
- >>> "format this: %X" % 5e-06
? -
+ >>> "format this: %X" % 5e-6
- format this: 0
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % 5e-21
- format this: 0
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % -0.5
- format this: 0
+ %X format: an integer is required, not float
Done.
- >>> "format this: %X" % -5e-06
? -
+ >>> "format this: %X" % -5e-6
- format this: 0
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % -5e-21
- format this: 0
+ %X format: an integer is required, not float
Done.
>>> "format this: %X" % 500000
format this: 7A120
Done.
>>> "format this: %X" % -500000
format this: -7A120
Done.
>>> "format this: %X" % 500000000000000000000
format this: 1B1AE4D6E2EF500000
Done.
>>> "format this: %X" % -500000000000000000000
format this: -1B1AE4D6E2EF500000
Done.
>>> "format this: %X" % 1361129467683753853853498429727072845824
format this: 400000000000000000000000000000000
Done.
>>> "format this: %X" % 1361129467683753853853498429727072845824
format this: 400000000000000000000000000000000
Done.
>>> "format this: %e" % "s"
a float is required
Done.
>>> "format this: %e" % "spam"
a float is required
Done.
>>> "format this: %e" % "5"
a float is required
Done.
>>> "format this: %e" % 5
format this: 5.00000...e+00
Done.
>>> "format this: %e" % -5
format this: -5.00000...e+00
Done.
>>> "format this: %e" % 5.0
format this: 5.00000...e+00
Done.
>>> "format this: %e" % -5.0
format this: -5.00000...e+00
Done.
>>> "format this: %e" % 0.5
- format this: 5.00000...e-01
? -
+ format this: 5.00000...e-1
Done.
>>> "format this: %e" % 0.5
- format this: 5.00000...e-01
? -
+ format this: 5.00000...e-1
Done.
- >>> "format this: %e" % 5e-06
? -
+ >>> "format this: %e" % 5e-6
- format this: 5.00000...e-06
? -
+ format this: 5.00000...e-6
Done.
>>> "format this: %e" % 5e-21
format this: 5.00000...e-21
Done.
>>> "format this: %e" % -0.5
- format this: -5.00000...e-01
? -
+ format this: -5.00000...e-1
Done.
- >>> "format this: %e" % -5e-06
? -
+ >>> "format this: %e" % -5e-6
- format this: -5.00000...e-06
? -
+ format this: -5.00000...e-6
Done.
>>> "format this: %e" % -5e-21
format this: -5.00000...e-21
Done.
>>> "format this: %e" % 500000
format this: 5.00000...e+05
Done.
>>> "format this: %e" % -500000
format this: -5.00000...e+05
Done.
>>> "format this: %e" % 500000000000000000000
format this: 5.00000...e+20
Done.
>>> "format this: %e" % -500000000000000000000
format this: -5.00000...e+20
Done.
>>> "format this: %e" % 1361129467683753853853498429727072845824
format this: 1.36112...e+39
Done.
>>> "format this: %e" % 1361129467683753853853498429727072845824
format this: 1.36112...e+39
Done.
>>> "format this: %E" % "s"
a float is required
Done.
>>> "format this: %E" % "spam"
a float is required
Done.
>>> "format this: %E" % "5"
a float is required
Done.
>>> "format this: %E" % 5
format this: 5.00000...E+00
Done.
>>> "format this: %E" % -5
format this: -5.00000...E+00
Done.
>>> "format this: %E" % 5.0
format this: 5.00000...E+00
Done.
>>> "format this: %E" % -5.0
format this: -5.00000...E+00
Done.
>>> "format this: %E" % 0.5
format this: 5.00000...E-01
Done.
>>> "format this: %E" % 0.5
format this: 5.00000...E-01
Done.
- >>> "format this: %E" % 5e-06
? -
+ >>> "format this: %E" % 5e-6
format this: 5.00000...E-06
Done.
>>> "format this: %E" % 5e-21
format this: 5.00000...E-21
Done.
>>> "format this: %E" % -0.5
format this: -5.00000...E-01
Done.
- >>> "format this: %E" % -5e-06
? -
+ >>> "format this: %E" % -5e-6
format this: -5.00000...E-06
Done.
>>> "format this: %E" % -5e-21
format this: -5.00000...E-21
Done.
>>> "format this: %E" % 500000
format this: 5.00000...E+05
Done.
>>> "format this: %E" % -500000
format this: -5.00000...E+05
Done.
>>> "format this: %E" % 500000000000000000000
format this: 5.00000...E+20
Done.
>>> "format this: %E" % -500000000000000000000
format this: -5.00000...E+20
Done.
>>> "format this: %E" % 1361129467683753853853498429727072845824
format this: 1.36112...E+39
Done.
>>> "format this: %E" % 1361129467683753853853498429727072845824
format this: 1.36112...E+39
Done.
>>> "format this: %f" % "s"
a float is required
Done.
>>> "format this: %f" % "spam"
a float is required
Done.
>>> "format this: %f" % "5"
a float is required
Done.
>>> "format this: %f" % 5
format this: 5.00000...
Done.
>>> "format this: %f" % -5
format this: -5.00000...
Done.
>>> "format this: %f" % 5.0
format this: 5.00000...
Done.
>>> "format this: %f" % -5.0
format this: -5.00000...
Done.
>>> "format this: %f" % 0.5
format this: 0.50000...
Done.
>>> "format this: %f" % 0.5
format this: 0.50000...
Done.
- >>> "format this: %f" % 5e-06
? -
+ >>> "format this: %f" % 5e-6
format this: 0.00000...
Done.
>>> "format this: %f" % 5e-21
format this: 0.00000...
Done.
>>> "format this: %f" % -0.5
format this: -0.50000...
Done.
- >>> "format this: %f" % -5e-06
? -
+ >>> "format this: %f" % -5e-6
format this: -0.00000...
Done.
>>> "format this: %f" % -5e-21
format this: -0.00000...
Done.
>>> "format this: %f" % 500000
format this: 500000.00000...
Done.
>>> "format this: %f" % -500000
format this: -500000.00000...
Done.
>>> "format this: %f" % 500000000000000000000
format this: 500000000000000000000.00000...
Done.
>>> "format this: %f" % -500000000000000000000
format this: -500000000000000000000.00000...
Done.
>>> "format this: %f" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %f" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %F" % "s"
a float is required
Done.
>>> "format this: %F" % "spam"
a float is required
Done.
>>> "format this: %F" % "5"
a float is required
Done.
>>> "format this: %F" % 5
format this: 5.00000...
Done.
>>> "format this: %F" % -5
format this: -5.00000...
Done.
>>> "format this: %F" % 5.0
format this: 5.00000...
Done.
>>> "format this: %F" % -5.0
format this: -5.00000...
Done.
>>> "format this: %F" % 0.5
format this: 0.50000...
Done.
>>> "format this: %F" % 0.5
format this: 0.50000...
Done.
- >>> "format this: %F" % 5e-06
? -
+ >>> "format this: %F" % 5e-6
format this: 0.00000...
Done.
>>> "format this: %F" % 5e-21
format this: 0.00000...
Done.
>>> "format this: %F" % -0.5
format this: -0.50000...
Done.
- >>> "format this: %F" % -5e-06
? -
+ >>> "format this: %F" % -5e-6
format this: -0.00000...
Done.
>>> "format this: %F" % -5e-21
format this: -0.00000...
Done.
>>> "format this: %F" % 500000
format this: 500000.00000...
Done.
>>> "format this: %F" % -500000
format this: -500000.00000...
Done.
>>> "format this: %F" % 500000000000000000000
format this: 500000000000000000000.00000...
Done.
>>> "format this: %F" % -500000000000000000000
format this: -500000000000000000000.00000...
Done.
>>> "format this: %F" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %F" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824.00000...
Done.
>>> "format this: %g" % "s"
a float is required
Done.
>>> "format this: %g" % "spam"
a float is required
Done.
>>> "format this: %g" % "5"
a float is required
Done.
>>> "format this: %g" % 5
format this: 5
Done.
>>> "format this: %g" % -5
format this: -5
Done.
>>> "format this: %g" % 5.0
format this: 5
Done.
>>> "format this: %g" % -5.0
format this: -5
Done.
>>> "format this: %g" % 0.5
format this: 0.5
Done.
>>> "format this: %g" % 0.5
format this: 0.5
Done.
- >>> "format this: %g" % 5e-06
? -
+ >>> "format this: %g" % 5e-6
- format this: 5e-06
? -
+ format this: 5e-6
Done.
>>> "format this: %g" % 5e-21
format this: 5e-21
Done.
>>> "format this: %g" % -0.5
format this: -0.5
Done.
- >>> "format this: %g" % -5e-06
? -
+ >>> "format this: %g" % -5e-6
- format this: -5e-06
? -
+ format this: -5e-6
Done.
>>> "format this: %g" % -5e-21
format this: -5e-21
Done.
>>> "format this: %g" % 500000
format this: 500000
Done.
>>> "format this: %g" % -500000
format this: -500000
Done.
>>> "format this: %g" % 500000000000000000000
format this: 5e+20
Done.
>>> "format this: %g" % -500000000000000000000
format this: -5e+20
Done.
>>> "format this: %g" % 1361129467683753853853498429727072845824
format this: 1.36113e+39
Done.
>>> "format this: %g" % 1361129467683753853853498429727072845824
format this: 1.36113e+39
Done.
>>> "format this: %G" % "s"
a float is required
Done.
>>> "format this: %G" % "spam"
a float is required
Done.
>>> "format this: %G" % "5"
a float is required
Done.
>>> "format this: %G" % 5
format this: 5
Done.
>>> "format this: %G" % -5
format this: -5
Done.
>>> "format this: %G" % 5.0
format this: 5
Done.
>>> "format this: %G" % -5.0
format this: -5
Done.
>>> "format this: %G" % 0.5
format this: 0.5
Done.
>>> "format this: %G" % 0.5
format this: 0.5
Done.
- >>> "format this: %G" % 5e-06
? -
+ >>> "format this: %G" % 5e-6
format this: 5E-06
Done.
>>> "format this: %G" % 5e-21
format this: 5E-21
Done.
>>> "format this: %G" % -0.5
format this: -0.5
Done.
- >>> "format this: %G" % -5e-06
? -
+ >>> "format this: %G" % -5e-6
format this: -5E-06
Done.
>>> "format this: %G" % -5e-21
format this: -5E-21
Done.
>>> "format this: %G" % 500000
format this: 500000
Done.
>>> "format this: %G" % -500000
format this: -500000
Done.
>>> "format this: %G" % 500000000000000000000
format this: 5E+20
Done.
>>> "format this: %G" % -500000000000000000000
format this: -5E+20
Done.
>>> "format this: %G" % 1361129467683753853853498429727072845824
format this: 1.36113E+39
Done.
>>> "format this: %G" % 1361129467683753853853498429727072845824
format this: 1.36113E+39
Done.
>>> "format this: %r" % "s"
format this: 's'
Done.
>>> "format this: %r" % "spam"
format this: 'spam'
Done.
>>> "format this: %r" % "5"
format this: '5'
Done.
>>> "format this: %r" % 5
format this: 5
Done.
>>> "format this: %r" % -5
format this: -5
Done.
>>> "format this: %r" % 5.0
format this: 5.0
Done.
>>> "format this: %r" % -5.0
format this: -5.0
Done.
>>> "format this: %r" % 0.5
format this: 0.5
Done.
>>> "format this: %r" % 0.5
format this: 0.5
Done.
- >>> "format this: %r" % 5e-06
? -
+ >>> "format this: %r" % 5e-6
- format this: 5e-06
? -
+ format this: 5e-6
Done.
>>> "format this: %r" % 5e-21
format this: 5e-21
Done.
>>> "format this: %r" % -0.5
format this: -0.5
Done.
- >>> "format this: %r" % -5e-06
? -
+ >>> "format this: %r" % -5e-6
- format this: -5e-06
? -
+ format this: -5e-6
Done.
>>> "format this: %r" % -5e-21
format this: -5e-21
Done.
>>> "format this: %r" % 500000
format this: 500000
Done.
>>> "format this: %r" % -500000
format this: -500000
Done.
>>> "format this: %r" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %r" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %r" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %r" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %s" % "s"
format this: s
Done.
>>> "format this: %s" % "spam"
format this: spam
Done.
>>> "format this: %s" % "5"
format this: 5
Done.
>>> "format this: %s" % 5
format this: 5
Done.
>>> "format this: %s" % -5
format this: -5
Done.
>>> "format this: %s" % 5.0
format this: 5.0
Done.
>>> "format this: %s" % -5.0
format this: -5.0
Done.
>>> "format this: %s" % 0.5
format this: 0.5
Done.
>>> "format this: %s" % 0.5
format this: 0.5
Done.
- >>> "format this: %s" % 5e-06
? -
+ >>> "format this: %s" % 5e-6
- format this: 5e-06
? -
+ format this: 5e-6
Done.
>>> "format this: %s" % 5e-21
format this: 5e-21
Done.
>>> "format this: %s" % -0.5
format this: -0.5
Done.
- >>> "format this: %s" % -5e-06
? -
+ >>> "format this: %s" % -5e-6
- format this: -5e-06
? -
+ format this: -5e-6
Done.
>>> "format this: %s" % -5e-21
format this: -5e-21
Done.
>>> "format this: %s" % 500000
format this: 500000
Done.
>>> "format this: %s" % -500000
format this: -500000
Done.
>>> "format this: %s" % 500000000000000000000
format this: 500000000000000000000
Done.
>>> "format this: %s" % -500000000000000000000
format this: -500000000000000000000
Done.
>>> "format this: %s" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
>>> "format this: %s" % 1361129467683753853853498429727072845824
format this: 1361129467683753853853498429727072845824
Done.
: Global context
======================================================================
FAIL: test_docstrings (tests.modules.test_math.MathTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/modules/test_math.py", line 172, in test_docstrings
""")
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: 'acos[514 chars]s an int.\nThis is the smallest integral value[2627 chars]d.\n' != 'acos[514 chars]s an Integral.\nThis is the smallest integer >[2623 chars]d.\n'
acos(x)
Return the arc cosine (measured in radians) of x.
acosh(x)
Return the inverse hyperbolic cosine of x.
asin(x)
Return the arc sine (measured in radians) of x.
asinh(x)
Return the inverse hyperbolic sine of x.
atan(x)
Return the arc tangent (measured in radians) of x.
atan2(y, x)
Return the arc tangent (measured in radians) of y/x.
Unlike atan(y/x), the signs of both x and y are considered.
atanh(x)
Return the inverse hyperbolic tangent of x.
ceil(x)
- Return the ceiling of x as an int.
? ^
+ Return the ceiling of x as an Integral.
? ^ +++++
- This is the smallest integral value >= x.
? --------
+ This is the smallest integer >= x.
? +
copysign(x, y)
Return a float with the magnitude (absolute value) of x but the sign
of y. On platforms that support signed zeros, copysign(1.0, -0.0)
returns -1.0.
cos(x)
Return the cosine of x (measured in radians).
cosh(x)
Return the hyperbolic cosine of x.
degrees(x)
Convert angle x from radians to degrees.
erf(x)
Error function at x.
erfc(x)
Complementary error function at x.
exp(x)
Return e raised to the power of x.
expm1(x)
Return exp(x)-1.
This function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x.
fabs(x)
Return the absolute value of the float x.
factorial(x) -> Integral
Find x!. Raise a ValueError if x is negative or non-integral.
floor(x)
- Return the floor of x as an int.
? ^
+ Return the floor of x as an Integral.
? ^ +++++
- This is the largest integral value <= x.
? --------
+ This is the largest integer <= x.
? +
fmod(x, y)
Return fmod(x, y), according to platform C. x % y may differ.
frexp(x)
Return the mantissa and exponent of x, as pair (m, e).
m is a float and e is an int, such that x = m * 2.**e.
If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0.
fsum(iterable)
Return an accurate floating point sum of values in the iterable.
Assumes IEEE-754 floating point arithmetic.
gamma(x)
Gamma function at x.
hypot(x, y)
Return the Euclidean distance, sqrt(x*x + y*y).
isfinite(x) -> bool
Return True if x is neither an infinity nor a NaN, and False otherwise.
isinf(x) -> bool
Return True if x is a positive or negative infinity, and False otherwise.
isnan(x) -> bool
Return True if x is a NaN (not a number), and False otherwise.
ldexp(x, i)
Return x * (2**i).
lgamma(x)
Natural logarithm of absolute value of Gamma function at x.
log(x[, base])
Return the logarithm of x to the given base.
If the base not specified, returns the natural logarithm (base e) of x.
log10(x)
Return the base 10 logarithm of x.
log1p(x)
Return the natural logarithm of 1+x (base e).
The result is computed in a way which is accurate for x near zero.
log2(x)
Return the base 2 logarithm of x.
modf(x)
Return the fractional and integer parts of x. Both results carry the sign
of x and are floats.
pow(x, y)
Return x**y (x to the power of y).
radians(x)
Convert angle x from degrees to radians.
sin(x)
Return the sine of x (measured in radians).
sinh(x)
Return the hyperbolic sine of x.
sqrt(x)
Return the square root of x.
tan(x)
Return the tangent of x (measured in radians).
tanh(x)
Return the hyperbolic tangent of x.
trunc(x:Real) -> Integral
Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method.
: Global context
======================================================================
FAIL: test_docstrings_35 (tests.modules.test_math.MathTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/modules/test_math.py", line 180, in test_docstrings_35
""")
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: 'gcd(x, y) -> int\n\ngreatest common divisor of x and y\nis_[718 chars]s.\n' != 'gcd(x, y) -> int\ngreatest common divisor of x and y\nisclo[715 chars]s.\n'
gcd(x, y) -> int
-
greatest common divisor of x and y
- is_close(a, b, *, rel_tol=1e-9, abs_tol=0.0) -> bool
? -
+ isclose(a, b, *, rel_tol=1e-9, abs_tol=0.0) -> bool
Determine whether two floating point numbers are close in value.
rel_tol
maximum difference for being considered "close", relative to the
magnitude of the input values
abs_tol
maximum difference for being considered "close", regardless of the
magnitude of the input values
Return True if a is close in value to b, and False otherwise.
For the values to be considered close, the difference between them
must be smaller than at least one of the tolerances.
-inf, inf and NaN behave similarly to the IEEE 754 Standard. That
is, NaN is not close to anything, even itself. inf and -inf are
only close to themselves.
: Global context
======================================================================
FAIL: test_mktime_args (tests.modules.test_time.TimeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/modules/test_time.py", line 223, in test_mktime_args
self.assertCodeExecution(test_str)
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [124 chars]n10360800.0\n>>> time.mktime((1970, 1, 5, 0, 0[259 chars].0\n' != '>>> [124 chars]n10364400.0\n>>> time.mktime((1970, 1, 5, 0, 0[259 chars].0\n'
>>> import time
>>> time.mktime((1999, 1, 1, 0, 0, 0, 0, 0, -1))
915145200.0
>>> time.mktime((1970, 5, 1, 0, 0, 0, 0, 0, 1))
- 10360800.0
? ^^
+ 10364400.0
? ^^
>>> time.mktime((1970, 1, 5, 0, 0, 0, 0, 0, -1))
342000.0
>>> time.mktime((1970, 1, 1, 5, 0, 0, 0, 0, -1))
14400.0
>>> time.mktime((1970, 1, 1, 0, 5, 0, 0, 0, -1))
-3300.0
>>> time.mktime((1970, 1, 1, 0, 0, 5, 0, 0, -1))
-3595.0
>>> time.mktime((1970, 1, 1, 0, 0, 0, 5, 0, -1))
-3600.0
: Global context
======================================================================
FAIL: test_mktime_dst (tests.modules.test_time.TimeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/modules/test_time.py", line 248, in test_mktime_dst
self.assertCodeExecution(test_str)
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [301 chars])\n7768800.0\ntrying month 5\n>>> time.mktime([586 chars].0\n' != '>>> [301 chars])\n7772400.0\ntrying month 5\n>>> time.mktime([586 chars].0\n'
>>> import time
trying month 1
>>> time.mktime((1970, 1, 1, 0, 0, 0, 0, 0, 0))
-3600.0
trying month 2
>>> time.mktime((1970, 2, 1, 0, 0, 0, 0, 0, 0))
2674800.0
trying month 3
>>> time.mktime((1970, 3, 1, 0, 0, 0, 0, 0, 0))
5094000.0
trying month 4
>>> time.mktime((1970, 4, 1, 0, 0, 0, 0, 0, 1))
- 7768800.0
+ 7772400.0
trying month 5
>>> time.mktime((1970, 5, 1, 0, 0, 0, 0, 0, 1))
- 10360800.0
? ^^
+ 10364400.0
? ^^
trying month 6
>>> time.mktime((1970, 6, 1, 0, 0, 0, 0, 0, 1))
- 13039200.0
? ^^
+ 13042800.0
? ^ +
trying month 7
>>> time.mktime((1970, 7, 1, 0, 0, 0, 0, 0, 1))
- 15631200.0
? ^^
+ 15634800.0
? ^^
trying month 8
>>> time.mktime((1970, 8, 1, 0, 0, 0, 0, 0, 1))
- 18309600.0
+ 18313200.0
trying month 9
>>> time.mktime((1970, 9, 1, 0, 0, 0, 0, 0, 1))
- 20988000.0
+ 20991600.0
trying month 10
>>> time.mktime((1970, 10, 1, 0, 0, 0, 0, 0, 1))
- 23580000.0
? ^^
+ 23583600.0
? ^^
trying month 11
>>> time.mktime((1970, 11, 1, 0, 0, 0, 0, 0, 1))
- 26258400.0
+ 26262000.0
trying month 12
>>> time.mktime((1970, 12, 1, 0, 0, 0, 0, 0, 0))
28854000.0
: Global context
======================================================================
FAIL: test_None (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: ">>> [64 chars]ex() argument must be a string, a bytes-like o[33 chars]\n\n" != ">>> [64 chars]ex() first argument must be a string, a bytes-[39 chars]\n\n"
>>> f = complex
>>> x = None
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'NoneType'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'NoneType'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_NotImplemented (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: ">>> [74 chars]ex() argument must be a string, a bytes-like o[43 chars]\n\n" != ">>> [74 chars]ex() first argument must be a string, a bytes-[49 chars]\n\n"
>>> f = complex
>>> x = NotImplemented
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'NotImplementedType'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'NotImplementedType'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_bytearray (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [87 chars]ex() argument must be a string, a bytes-like o[36 chars]\n\n' != '>>> [87 chars]ex() first argument must be a string, a bytes-[42 chars]\n\n'
>>> f = complex
>>> x = bytearray(b"hello world")
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'bytearray'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'bytearray'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_bytes (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [65 chars]ex() argument must be a string, a bytes-like o[370 chars]\n\n' != '>>> [65 chars]ex() first argument must be a string, a bytes-[388 chars]\n\n'
>>> f = complex
>>> x = b""
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'bytes'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'bytes'
? ++++++
>>> f = complex
>>> x = b"This is another string of bytes"
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'bytes'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'bytes'
? ++++++
>>> f = complex
>>> x = b"u"
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'bytes'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'bytes'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_class (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [69 chars]ex() argument must be a string, a bytes-like o[364 chars]\n\n' != '>>> [69 chars]ex() first argument must be a string, a bytes-[382 chars]\n\n'
>>> f = complex
>>> x = type(1)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'type'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'type'
? ++++++
>>> f = complex
>>> x = type("a")
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'type'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'type'
? ++++++
>>> f = complex
>>> x = type("MyClass", (object,), {})
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'type'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'type'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_dict (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [64 chars]ex() argument must be a string, a bytes-like o[392 chars]\n\n' != '>>> [64 chars]ex() first argument must be a string, a bytes-[410 chars]\n\n'
>>> f = complex
>>> x = {}
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'dict'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'dict'
? ++++++
>>> f = complex
>>> x = {"a": 1, "c": 2.3456, "d": "another"}
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'dict'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'dict'
? ++++++
>>> f = complex
>>> x = {"a": {"a": 1}, "b": {"b": 2}}
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'dict'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'dict'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_frozenset (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [73 chars]ex() argument must be a string, a bytes-like o[387 chars]\n\n' != '>>> [73 chars]ex() first argument must be a string, a bytes-[405 chars]\n\n'
>>> f = complex
>>> x = frozenset()
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'frozenset'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'frozenset'
? ++++++
>>> f = complex
>>> x = frozenset([1])
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'frozenset'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'frozenset'
? ++++++
>>> f = complex
>>> x = frozenset({1, 2.3456, "another"})
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'frozenset'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'frozenset'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_list (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [64 chars]ex() argument must be a string, a bytes-like o[838 chars]\n\n' != '>>> [64 chars]ex() first argument must be a string, a bytes-[874 chars]\n\n'
>>> f = complex
>>> x = []
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'list'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'list'
? ++++++
>>> f = complex
>>> x = [1]
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'list'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'list'
? ++++++
>>> f = complex
>>> x = [3, 4, 5]
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'list'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'list'
? ++++++
>>> f = complex
>>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'list'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'list'
? ++++++
>>> f = complex
>>> x = ["a","b","c"]
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'list'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'list'
? ++++++
>>> f = complex
>>> x = [[1, 2], [3, 4]]
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'list'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'list'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_range (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: ">>> [68 chars]ex() argument must be a string, a bytes-like o[813 chars]\n\n" != ">>> [68 chars]ex() first argument must be a string, a bytes-[849 chars]\n\n"
>>> f = complex
>>> x = range(0)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'range'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'range'
? ++++++
>>> f = complex
>>> x = range(5)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'range'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'range'
? ++++++
>>> f = complex
>>> x = range(2, 7)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'range'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'range'
? ++++++
>>> f = complex
>>> x = range(2, 7, 2)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'range'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'range'
? ++++++
>>> f = complex
>>> x = range(7, 2, -1)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'range'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'range'
? ++++++
>>> f = complex
>>> x = range(7, 2, -2)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'range'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'range'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_set (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [67 chars]ex() argument must be a string, a bytes-like o[198 chars]\n\n' != '>>> [67 chars]ex() first argument must be a string, a bytes-[210 chars]\n\n'
>>> f = complex
>>> x = set()
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'set'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'set'
? ++++++
>>> f = complex
>>> x = {1, 2.3456, "another"}
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'set'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'set'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_slice (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: ">>> [68 chars]ex() argument must be a string, a bytes-like o[813 chars]\n\n" != ">>> [68 chars]ex() first argument must be a string, a bytes-[849 chars]\n\n"
>>> f = complex
>>> x = slice(0)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'slice'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'slice'
? ++++++
>>> f = complex
>>> x = slice(5)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'slice'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'slice'
? ++++++
>>> f = complex
>>> x = slice(2, 7)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'slice'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'slice'
? ++++++
>>> f = complex
>>> x = slice(2, 7, 2)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'slice'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'slice'
? ++++++
>>> f = complex
>>> x = slice(7, 2, -1)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'slice'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'slice'
? ++++++
>>> f = complex
>>> x = slice(7, 2, -2)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'slice'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'slice'
? ++++++
: Global context: Error running f(x)
======================================================================
FAIL: test_tuple (tests.builtins.test_complex.BuiltinComplexFunctionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 1231, in func
substitutions=getattr(self, 'substitutions', SAMPLE_SUBSTITUTIONS)
File "/home/alex/Code/batavia/tests/utils.py", line 1271, in assertBuiltinFunction
run_in_function=False,
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [64 chars]ex() argument must be a string, a bytes-like o[1335 chars]\n\n' != '>>> [64 chars]ex() first argument must be a string, a bytes-[1389 chars]\n\n'
>>> f = complex
>>> x = ()
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = (False,)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = (1,)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = (1, 2)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = (3, 1.2, True, )
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = (1, 2.3456, "another")
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = ((1, 2), (3, 4))
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
>>> f = complex
>>> x = ((3, 4), (1, 2))
>>> f(x)
- <class 'TypeError'> : complex() argument must be a string, a bytes-like object or a number, not 'tuple'
+ <class 'TypeError'> : complex() first argument must be a string, a bytes-like object or a number, not 'tuple'
? ++++++
: Global context: Error running f(x)
----------------------------------------------------------------------
Ran 12429 tests in 2751.176s
FAILED (failures=17, expected failures=2789)
python setup.py test 2543.40s user 325.38s system 104% cpu 45:51.68 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment