summaryrefslogtreecommitdiffstats
path: root/tests/languages
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-27 16:04:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-27 16:04:10 +0000
commita971f38b11f5955f6ea4f7922233d8324a5c6753 (patch)
tree5a424740e9cee97bc1c8053fea07db935c27b659 /tests/languages
parentAdding upstream version 2.8.2. (diff)
downloadpre-commit-a971f38b11f5955f6ea4f7922233d8324a5c6753.tar.xz
pre-commit-a971f38b11f5955f6ea4f7922233d8324a5c6753.zip
Adding upstream version 2.9.3.upstream/2.9.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/languages')
-rw-r--r--tests/languages/python_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/languages/python_test.py b/tests/languages/python_test.py
index cfe1483..90d1036 100644
--- a/tests/languages/python_test.py
+++ b/tests/languages/python_test.py
@@ -23,6 +23,13 @@ def test_read_pyvenv_cfg(tmpdir):
assert python._read_pyvenv_cfg(pyvenv_cfg) == expected
+def test_read_pyvenv_cfg_non_utf8(tmpdir):
+ pyvenv_cfg = tmpdir.join('pyvenv_cfg')
+ pyvenv_cfg.write_binary('hello = hello john.š\n'.encode())
+ expected = {'hello': 'hello john.š'}
+ assert python._read_pyvenv_cfg(pyvenv_cfg) == expected
+
+
def test_norm_version_expanduser():
home = os.path.expanduser('~')
if os.name == 'nt': # pragma: nt cover