summaryrefslogtreecommitdiffstats
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>2011-12-09 16:48:59 -0200
commit4f5ac5fa5b8ae61274a443d16a9ef76bf551a81d (patch)
tree99474e3371f49488fb562df6c6dbe30152249868
parent5cbd9c775e8b53a21fa66b3fe7afc4a2b5c67437 (diff)
downloadpyside-4f5ac5fa5b8ae61274a443d16a9ef76bf551a81d.tar.gz
pyside-4f5ac5fa5b8ae61274a443d16a9ef76bf551a81d.tar.xz
pyside-4f5ac5fa5b8ae61274a443d16a9ef76bf551a81d.zip
Makes test for QtCore's bug #1063 compliant with Python 3.
-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 3de10d2..fe78730 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)