FileUtils.detect_encoding doctest raises TypeError: encode() takes no keyword arguments
On Python 3.4.8:
_______________ [doctest] coala_utils.FileUtils.detect_encoding ________________
019
020 Detects the file encoding by reading out the BOM.
021
022 Given a file with a BOM signature:
023
024 >>> import os, tempfile
025 >>> text = 'ä'
026 >>> encoded = codecs.encode(text, encoding='utf-16-le')
UNEXPECTED EXCEPTION: TypeError('encode() takes no keyword arguments',)
Traceback (most recent call last):
File "/usr/local/lib/python3.4/doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest coala_utils.FileUtils.detect_encoding[2]>", line 1, in <module>
TypeError: encode() takes no keyword arguments
Edited by John Vandenberg