summaryrefslogtreecommitdiff
path: root/tests/test_glib.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_glib.py')
-rw-r--r--tests/test_glib.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/test_glib.py b/tests/test_glib.py
index 70be98e6..0a5cb3d6 100644
--- a/tests/test_glib.py
+++ b/tests/test_glib.py
@@ -1,7 +1,4 @@
# -*- Mode: Python -*-
-# encoding: UTF-8
-
-from __future__ import absolute_import
import os
import sys
@@ -13,7 +10,6 @@ import subprocess
import pytest
from gi.repository import GLib
from gi import PyGIDeprecationWarning
-from gi._compat import PY3
class TestGLib(unittest.TestCase):
@@ -83,12 +79,8 @@ class TestGLib(unittest.TestCase):
if isinstance(f, bytes):
return f
if os.name == "nt":
- if PY3:
- return f.encode("utf-8", "surrogatepass")
- else:
- return f.encode("utf-8")
+ return f.encode("utf-8", "surrogatepass")
else:
- assert PY3
return os.fsencode(f)
# this is locale dependent, so we cannot completely verify the result