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:
Renato Alves 2015-07-24 15:27:02 +01:00
parent 341b528980
commit 3c7187d801
3 changed files with 15 additions and 10 deletions

9
test/basetest/compat.py Normal file
View 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