Guest User

Benchmarks: 2to3 failures on the py3 side

a guest
Feb 10th, 2012
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 27.07 KB | None | 0 0
  1. ======================================================================
  2. ERROR: test_all_project_files (lib2to3.tests.test_parser.TestParserIdempotency)
  3. ----------------------------------------------------------------------
  4. Traceback (most recent call last):
  5.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_parser.py", line 162, in test_all_project_files
  6.     source = source.decode(encoding)
  7. AttributeError: 'str' object has no attribute 'decode'
  8.  
  9. ======================================================================
  10. ERROR: test_unencodable_diff (lib2to3.tests.test_main.TestMain)
  11. ----------------------------------------------------------------------
  12. Traceback (most recent call last):
  13.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_main.py", line 36, in test_unencodable_diff
  14.     ret = self.run_2to3_capture(["-"], input_stream, out_enc, err)
  15.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_main.py", line 25, in run_2to3_capture
  16.     return main.main("lib2to3.fixes", args)
  17.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/main.py", line 169, in main
  18.     rt.refactor_stdin()
  19.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 396, in refactor_stdin
  20.     self.processed_file(str(tree), "<stdin>", input)
  21.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 513, in processed_file
  22.     self.print_output(old_text, new_text, filename, equal)
  23.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/main.py", line 74, in print_output
  24.     print(line)
  25.   File "/usr/lib/python3.2/codecs.py", line 356, in write
  26.     self.stream.write(data)
  27. TypeError: string argument expected, got 'bytes'
  28.  
  29. ======================================================================
  30. ERROR: test_bare_isCallable (lib2to3.tests.test_fixers.Test_operator)
  31. ----------------------------------------------------------------------
  32. Traceback (most recent call last):
  33.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4397, in test_bare_isCallable
  34.     self.warns_unchanged(s, t)
  35.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  36.     self.warns(before, before, message, unchanged=True)
  37.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  38.     tree = self._check(before, after)
  39.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  40.     tree = self.refactor.refactor_string(before, self.filename)
  41.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  42.     self.refactor_tree(tree, name)
  43.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  44.     new = fixer.transform(node, results)
  45.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  46.     method = self._check_method(node, results)
  47.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  48.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  49. TypeError: Can't convert 'bytes' object to str implicitly
  50.  
  51. ======================================================================
  52. ERROR: test_bare_operator_irepeat (lib2to3.tests.test_fixers.Test_operator)
  53. ----------------------------------------------------------------------
  54. Traceback (most recent call last):
  55.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4427, in test_bare_operator_irepeat
  56.    self.warns_unchanged(s, t)
  57.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  58.    self.warns(before, before, message, unchanged=True)
  59.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  60.    tree = self._check(before, after)
  61.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  62.    tree = self.refactor.refactor_string(before, self.filename)
  63.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  64.    self.refactor_tree(tree, name)
  65.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  66.    new = fixer.transform(node, results)
  67.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  68.    method = self._check_method(node, results)
  69.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  70.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  71. TypeError: Can't convert 'bytes' object to str implicitly
  72.  
  73. ======================================================================
  74. ERROR: test_bare_operator_isMappingType (lib2to3.tests.test_fixers.Test_operator)
  75. ----------------------------------------------------------------------
  76. Traceback (most recent call last):
  77.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4412, in test_bare_operator_isMappingType
  78.     self.warns_unchanged(s, t)
  79.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  80.     self.warns(before, before, message, unchanged=True)
  81.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  82.     tree = self._check(before, after)
  83.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  84.     tree = self.refactor.refactor_string(before, self.filename)
  85.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  86.     self.refactor_tree(tree, name)
  87.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  88.     new = fixer.transform(node, results)
  89.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  90.     method = self._check_method(node, results)
  91.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  92.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  93. TypeError: Can't convert 'bytes' object to str implicitly
  94.  
  95. ======================================================================
  96. ERROR: test_bare_operator_isNumberType (lib2to3.tests.test_fixers.Test_operator)
  97. ----------------------------------------------------------------------
  98. Traceback (most recent call last):
  99.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4417, in test_bare_operator_isNumberType
  100.    self.warns_unchanged(s, t)
  101.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  102.    self.warns(before, before, message, unchanged=True)
  103.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  104.    tree = self._check(before, after)
  105.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  106.    tree = self.refactor.refactor_string(before, self.filename)
  107.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  108.    self.refactor_tree(tree, name)
  109.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  110.    new = fixer.transform(node, results)
  111.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  112.    method = self._check_method(node, results)
  113.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  114.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  115. TypeError: Can't convert 'bytes' object to str implicitly
  116.  
  117. ======================================================================
  118. ERROR: test_bare_operator_isSequenceType (lib2to3.tests.test_fixers.Test_operator)
  119. ----------------------------------------------------------------------
  120. Traceback (most recent call last):
  121.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4407, in test_bare_operator_isSequenceType
  122.     self.warns_unchanged(s, t)
  123.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  124.     self.warns(before, before, message, unchanged=True)
  125.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  126.     tree = self._check(before, after)
  127.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  128.     tree = self.refactor.refactor_string(before, self.filename)
  129.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  130.     self.refactor_tree(tree, name)
  131.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  132.     new = fixer.transform(node, results)
  133.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  134.     method = self._check_method(node, results)
  135.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  136.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  137. TypeError: Can't convert 'bytes' object to str implicitly
  138.  
  139. ======================================================================
  140. ERROR: test_bare_operator_repeat (lib2to3.tests.test_fixers.Test_operator)
  141. ----------------------------------------------------------------------
  142. Traceback (most recent call last):
  143.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4422, in test_bare_operator_repeat
  144.    self.warns_unchanged(s, t)
  145.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  146.    self.warns(before, before, message, unchanged=True)
  147.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  148.    tree = self._check(before, after)
  149.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  150.    tree = self.refactor.refactor_string(before, self.filename)
  151.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  152.    self.refactor_tree(tree, name)
  153.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  154.    new = fixer.transform(node, results)
  155.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  156.    method = self._check_method(node, results)
  157.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  158.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  159. TypeError: Can't convert 'bytes' object to str implicitly
  160.  
  161. ======================================================================
  162. ERROR: test_bare_sequenceIncludes (lib2to3.tests.test_fixers.Test_operator)
  163. ----------------------------------------------------------------------
  164. Traceback (most recent call last):
  165.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4402, in test_bare_sequenceIncludes
  166.     self.warns_unchanged(s, t)
  167.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged
  168.     self.warns(before, before, message, unchanged=True)
  169.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 43, in warns
  170.     tree = self._check(before, after)
  171.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  172.     tree = self.refactor.refactor_string(before, self.filename)
  173.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  174.     self.refactor_tree(tree, name)
  175.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  176.     new = fixer.transform(node, results)
  177.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  178.     method = self._check_method(node, results)
  179.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  180.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  181. TypeError: Can't convert 'bytes' object to str implicitly
  182.  
  183. ======================================================================
  184. ERROR: test_operator_irepeat (lib2to3.tests.test_fixers.Test_operator)
  185. ----------------------------------------------------------------------
  186. Traceback (most recent call last):
  187.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4384, in test_operator_irepeat
  188.    self.check(b, a)
  189.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  190.    tree = self._check(before, after)
  191.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  192.    tree = self.refactor.refactor_string(before, self.filename)
  193.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  194.    self.refactor_tree(tree, name)
  195.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  196.    new = fixer.transform(node, results)
  197.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  198.    method = self._check_method(node, results)
  199.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  200.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  201. TypeError: Can't convert 'bytes' object to str implicitly
  202.  
  203. ======================================================================
  204. ERROR: test_operator_isCallable (lib2to3.tests.test_fixers.Test_operator)
  205. ----------------------------------------------------------------------
  206. Traceback (most recent call last):
  207.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4338, in test_operator_isCallable
  208.     self.check(b, a)
  209.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  210.     tree = self._check(before, after)
  211.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  212.     tree = self.refactor.refactor_string(before, self.filename)
  213.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  214.     self.refactor_tree(tree, name)
  215.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  216.     new = fixer.transform(node, results)
  217.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  218.     method = self._check_method(node, results)
  219.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  220.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  221. TypeError: Can't convert 'bytes' object to str implicitly
  222.  
  223. ======================================================================
  224. ERROR: test_operator_isMappingType (lib2to3.tests.test_fixers.Test_operator)
  225. ----------------------------------------------------------------------
  226. Traceback (most recent call last):
  227.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4361, in test_operator_isMappingType
  228.    self.check(b, a)
  229.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  230.    tree = self._check(before, after)
  231.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  232.    tree = self.refactor.refactor_string(before, self.filename)
  233.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  234.    self.refactor_tree(tree, name)
  235.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  236.    new = fixer.transform(node, results)
  237.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  238.    method = self._check_method(node, results)
  239.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  240.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  241. TypeError: Can't convert 'bytes' object to str implicitly
  242.  
  243. ======================================================================
  244. ERROR: test_operator_isNumberType (lib2to3.tests.test_fixers.Test_operator)
  245. ----------------------------------------------------------------------
  246. Traceback (most recent call last):
  247.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4366, in test_operator_isNumberType
  248.     self.check(b, a)
  249.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  250.     tree = self._check(before, after)
  251.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  252.     tree = self.refactor.refactor_string(before, self.filename)
  253.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  254.     self.refactor_tree(tree, name)
  255.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  256.     new = fixer.transform(node, results)
  257.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  258.     method = self._check_method(node, results)
  259.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  260.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  261. TypeError: Can't convert 'bytes' object to str implicitly
  262.  
  263. ======================================================================
  264. ERROR: test_operator_isSequenceType (lib2to3.tests.test_fixers.Test_operator)
  265. ----------------------------------------------------------------------
  266. Traceback (most recent call last):
  267.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4356, in test_operator_isSequenceType
  268.    self.check(b, a)
  269.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  270.    tree = self._check(before, after)
  271.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  272.    tree = self.refactor.refactor_string(before, self.filename)
  273.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  274.    self.refactor_tree(tree, name)
  275.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  276.    new = fixer.transform(node, results)
  277.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  278.    method = self._check_method(node, results)
  279.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  280.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  281. TypeError: Can't convert 'bytes' object to str implicitly
  282.  
  283. ======================================================================
  284. ERROR: test_operator_repeat (lib2to3.tests.test_fixers.Test_operator)
  285. ----------------------------------------------------------------------
  286. Traceback (most recent call last):
  287.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4371, in test_operator_repeat
  288.     self.check(b, a)
  289.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  290.     tree = self._check(before, after)
  291.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  292.     tree = self.refactor.refactor_string(before, self.filename)
  293.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  294.     self.refactor_tree(tree, name)
  295.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  296.     new = fixer.transform(node, results)
  297.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  298.     method = self._check_method(node, results)
  299.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  300.     method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  301. TypeError: Can't convert 'bytes' object to str implicitly
  302.  
  303. ======================================================================
  304. ERROR: test_operator_sequenceIncludes (lib2to3.tests.test_fixers.Test_operator)
  305. ----------------------------------------------------------------------
  306. Traceback (most recent call last):
  307.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 4343, in test_operator_sequenceIncludes
  308.    self.check(b, a)
  309.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 37, in check
  310.    tree = self._check(before, after)
  311.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_fixers.py", line 32, in _check
  312.    tree = self.refactor.refactor_string(before, self.filename)
  313.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 381, in refactor_string
  314.    self.refactor_tree(tree, name)
  315.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 455, in refactor_tree
  316.    new = fixer.transform(node, results)
  317.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 43, in transform
  318.    method = self._check_method(node, results)
  319.  File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method
  320.    method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
  321. TypeError: Can't convert 'bytes' object to str implicitly
  322.  
  323. ======================================================================
  324. ERROR: test_all_project_files (lib2to3.tests.test_all_fixers.Test_all)
  325. ----------------------------------------------------------------------
  326. Traceback (most recent call last):
  327.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_all_fixers.py", line 23, in test_all_project_files
  328.     self.refactor.refactor_file(filepath)
  329.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 349, in refactor_file
  330.     tree = self.refactor_string(input, filename)
  331.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 375, in refactor_string
  332.     name, err.__class__.__name__, err)
  333.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/refactor.py", line 372, in refactor_string
  334.     tree = self.driver.parse_string(data)
  335.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/pgen2/driver.py", line 105, in parse_string
  336.     return self.parse_tokens(tokens, debug)
  337.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/pgen2/driver.py", line 70, in parse_tokens
  338.     if p.addtoken(type, value, (prefix, start)):
  339.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/pgen2/parse.py", line 159, in addtoken
  340.     raise ParseError("bad input", type, value, context)
  341. lib2to3.pgen2.parse.ParseError: bad input: type=22, value='=', context=('', (82, 38))
  342.  
  343. ======================================================================
  344. FAIL: test_bom (lib2to3.tests.test_refactor.TestRefactoringTool)
  345. ----------------------------------------------------------------------
  346. Traceback (most recent call last):
  347.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_refactor.py", line 240, in test_bom
  348.     data = self.check_file_refactoring(fn)
  349.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_refactor.py", line 192, in check_file_refactoring
  350.     self.assertNotEqual(old_contents, new_contents)
  351. AssertionError: b'\xef\xbb\xbf# coding: utf-8\nprint("BOM BOOM!")\n' == b'\xef\xbb\xbf# coding: utf-8\nprint("BOM BOOM!")\n'
  352.  
  353. ======================================================================
  354. FAIL: test_crlf_newlines (lib2to3.tests.test_refactor.TestRefactoringTool)
  355. ----------------------------------------------------------------------
  356. Traceback (most recent call last):
  357.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_refactor.py", line 249, in test_crlf_newlines
  358.     self.check_file_refactoring(fn, fixes)
  359.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_refactor.py", line 192, in check_file_refactoring
  360.     self.assertNotEqual(old_contents, new_contents)
  361. AssertionError: b'print("hi")\n\nprint("Like bad Windows newlines?")\n' == b'print("hi")\n\nprint("Like bad Windows newlines?")\n'
  362.  
  363. ======================================================================
  364. FAIL: test_file_encoding (lib2to3.tests.test_refactor.TestRefactoringTool)
  365. ----------------------------------------------------------------------
  366. Traceback (most recent call last):
  367.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_refactor.py", line 236, in test_file_encoding
  368.     self.check_file_refactoring(fn)
  369.   File "/home/ci/prog/cpython/benchmarks/py3/lib/2to3/lib2to3/tests/test_refactor.py", line 192, in check_file_refactoring
  370.     self.assertNotEqual(old_contents, new_contents)
  371. AssertionError: b"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nprint('\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e')\n\ndef f(x):\n    print('%s\\t->  \xce\xb1(%2i):%s  \xce\xb2(%s)')\n" == b"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nprint('\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e')\n\ndef f(x):\n    print('%s\\t->  \xce\xb1(%2i):%s  \xce\xb2(%s)')\n"
  372.  
  373. ----------------------------------------------------------------------
  374. Ran 572 tests in 10.023s
  375.  
  376. FAILED (failures=3, errors=17)
Advertisement
Add Comment
Please, Sign In to add comment