pygobject r742 - trunk/tests
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: pygobject r742 - trunk/tests
- Date: Sun, 20 Jan 2008 15:49:53 +0000 (GMT)
Author: johan
Date: Sun Jan 20 15:49:52 2008
New Revision: 742
URL: http://svn.gnome.org/viewvc/pygobject?rev=742&view=rev
Log:
Reuse file descriptor for reading and writing. Avoid unnecessary flush()
Modified:
trunk/tests/test_gio.py
Modified: trunk/tests/test_gio.py
==============================================================================
--- trunk/tests/test_gio.py (original)
+++ trunk/tests/test_gio.py Sun Jan 20 15:49:52 2008
@@ -8,10 +8,9 @@
class TestInputStream(unittest.TestCase):
def setUp(self):
- f = open("inputstream.txt", "w")
- f.write("testing")
-
- self._f = open("inputstream.txt", "r")
+ self._f = open("inputstream.txt", "w+")
+ self._f.write("testing")
+ self._f.seek(0)
self.stream = gio.unix.InputStream(self._f.fileno(), False)
def tearDown(self):
@@ -57,7 +56,6 @@
def setUp(self):
self._f = open("outputstream.txt", "w")
self.stream = gio.unix.OutputStream(self._f.fileno(), False)
- self._f.flush()
def tearDown(self):
self._f.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]