Tests: Create compat.py for Python 3 compatibility
Individual tests are not yet fully compatible with Python 3. Some still have issues with I/O encoding/decoding. The painful part...
This commit is contained in:
9
test/basetest/compat.py
Normal file
9
test/basetest/compat.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
try:
|
||||
STRING_TYPE = basestring
|
||||
except NameError:
|
||||
# Python 3
|
||||
STRING_TYPE = str
|
||||
|
||||
# vim: ai sts=4 et sw=4
|
||||
Reference in New Issue
Block a user