aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 16:02:47 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:18 -0300
commit41f1c3037231330b48a60f9d3bec62265bcd436b (patch)
treec4e6cac7d1bdae17f4c01aae672cf470a12b20b4 /tests
parent720a6f4cadae3e0267749391648ace6ad3357125 (diff)
Makes test for QtCore's bug #1063 compliant with Python 3.
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/bug_1063.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/QtCore/bug_1063.py b/tests/QtCore/bug_1063.py
index 3de10d293..fe7873093 100644
--- a/tests/QtCore/bug_1063.py
+++ b/tests/QtCore/bug_1063.py
@@ -4,6 +4,7 @@ import unittest
import tempfile
from PySide import QtCore
import os
+import py3kcompat as py3k
class QTextStreamTestCase(unittest.TestCase):
def setUp(self):
@@ -11,7 +12,7 @@ class QTextStreamTestCase(unittest.TestCase):
self.temp_file.close()
self.f = QtCore.QFile(self.temp_file.name)
self.f.open(QtCore.QIODevice.WriteOnly)
- self.strings = (u'foo', u'bar')
+ self.strings = (py3k.unicode_('foo'), py3k.unicode_('bar'))
self.stream = QtCore.QTextStream(self.f)
def testIt(self):
@@ -21,7 +22,7 @@ class QTextStreamTestCase(unittest.TestCase):
self.f.close()
# make sure we didn't get an empty file
- self.assertNotEqual(QtCore.QFile(self.temp_file.name).size(), 0L)
+ self.assertNotEqual(QtCore.QFile(self.temp_file.name).size(), 0)
os.unlink(self.temp_file.name)