From 33eb94f0378e35f3624b50c8c71f46b958379284 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 25 Nov 2019 05:12:25 +0100 Subject: [PATCH] Tests: small py3 cleanup --- test/test_xattr.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/test/test_xattr.py b/test/test_xattr.py index 496f3db..088abf3 100644 --- a/test/test_xattr.py +++ b/test/test_xattr.py @@ -12,12 +12,7 @@ from xattr import NS_USER, XATTR_CREATE, XATTR_REPLACE NAMESPACE = os.environ.get("NAMESPACE", NS_USER) -if sys.hexversion >= 0x03000000: - PY3K = True - EMPTY_NS = bytes() -else: - PY3K = False - EMPTY_NS = '' +EMPTY_NS = bytes() TEST_DIR = os.environ.get("TEST_DIR", ".") TEST_IGNORE_XATTRS = os.environ.get("TEST_IGNORE_XATTRS", "") @@ -36,12 +31,11 @@ EMPTY_VAL = "" LARGE_VAL = "x" * 2048 MANYOPS_COUNT = 16384 -if PY3K: - USER_NN = USER_NN.encode() - USER_VAL = USER_VAL.encode() - USER_ATTR = USER_ATTR.encode() - EMPTY_VAL = EMPTY_VAL.encode() - LARGE_VAL = LARGE_VAL.encode() +USER_NN = USER_NN.encode() +USER_VAL = USER_VAL.encode() +USER_ATTR = USER_ATTR.encode() +EMPTY_VAL = EMPTY_VAL.encode() +LARGE_VAL = LARGE_VAL.encode() # Helper functions -- 2.39.5