Add a simple test for Fflush() functionality in python
authorPanu Matilainen <Panu Matilainen pmatilai@redhat.com>
Fri, 8 Jul 2011 11:54:42 +0000 (14:54 +0300)
committerPanu Matilainen <Panu Matilainen pmatilai@redhat.com>
Fri, 8 Jul 2011 11:57:31 +0000 (14:57 +0300)
- Prior to previous patch this segfaulted and tracebacked...

tests/rpmpython.at

index 6275502..1669715 100644 (file)
@@ -43,6 +43,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'gzdio' ]:
         myprint('%s write fail' % iot)
     if fn != fd.name:
         myprint('bad file name %s' % fd.name)
+    fd.flush()
     fd = rpm.fd(fn, 'r', iot)
     rdata = fd.read()
     if rdata != data: