Fix qresource_test openning the file in binary mode, so it doesn't fail on windows.
This commit is contained in:
parent
143e81278c
commit
f8e6845c81
1 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ class ResourcesUsage(unittest.TestCase):
|
||||||
|
|
||||||
def testPhrase(self):
|
def testPhrase(self):
|
||||||
#Test loading of quote.txt resource
|
#Test loading of quote.txt resource
|
||||||
f = open(adjust_filename('quoteEnUS.txt', __file__))
|
f = open(adjust_filename('quoteEnUS.txt', __file__), "r")
|
||||||
orig = f.read()
|
orig = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ class ResourcesUsage(unittest.TestCase):
|
||||||
|
|
||||||
def testImage(self):
|
def testImage(self):
|
||||||
#Test loading of sample.png resource
|
#Test loading of sample.png resource
|
||||||
f = open(adjust_filename('sample.png', __file__))
|
f = open(adjust_filename('sample.png', __file__), "rb")
|
||||||
orig = f.read()
|
orig = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue