Set encoding in test driver

Python3 handles encoding differently, and files are loaded
according to the locale set on the system.

This means that when building on a locale-less chroot,
the tests will always fail because it will try to load utf-8
and encode it as ASCII.

This forces the encoding. The tests are encoded in utf-8 anyway
so any other encoding set by the locale would cause a failure.
master
Salvo 'LtWorf' Tomaselli 2015-06-13 17:24:38 +07:00
parent 4c41132705
commit 0385478f91
1 changed files with 1 additions and 1 deletions

@ -40,7 +40,7 @@ tests_path = 'test/'
def readfile(fname):
'''Reads a file as string and returns its content'''
fd = open(fname)
fd = open(fname,encoding='utf-8')
expr = fd.read()
fd.close()
return expr