https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-architect-74417

04/26/2019, 10:06 PM
FYI: If you mock open function by using
builtins.open
, don't forget to call self.addCleanup to stop the mock. Otherwise, pants might break
Copy code
INTERNALERROR>   File "/pants/.pants.d/test/pytest-prep/CPython-3.6.8/9af8c28d7aeb4e69b8a4a563c2ce5c843d1408cf/.deps/coverage-4.5.3-cp36-cp36m-manylinux1_x86_64.whl/coverage/parser.py", line 44, in __init__
                     INTERNALERROR>     self.text = get_python_source(self.filename)
                     INTERNALERROR>   File "/pants/.pants.d/test/pytest-prep/CPython-3.6.8/9af8c28d7aeb4e69b8a4a563c2ce5c843d1408cf/.deps/coverage-4.5.3-cp36-cp36m-manylinux1_x86_64.whl/coverage/python.py", line 50, in get_python_source
                     INTERNALERROR>     source = read_python_source(try_filename)
                     INTERNALERROR>   File "/pants/.pants.d/test/pytest-prep/CPython-3.6.8/9af8c28d7aeb4e69b8a4a563c2ce5c843d1408cf/.deps/coverage-4.5.3-cp36-cp36m-manylinux1_x86_64.whl/coverage/python.py", line 34, in read_python_source
                     INTERNALERROR>     return source.replace(b"\r\n", b"\n").replace(b"\r", b"\n")
                     INTERNALERROR> TypeError: replace() argument 1 must be str, not bytes