File: test_fsync-eatmydata

package info (click to toggle)
pypy 7.0.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 107,216 kB
  • sloc: python: 1,201,787; ansic: 62,419; asm: 5,169; cpp: 3,017; sh: 2,534; makefile: 545; xml: 243; lisp: 45; awk: 4
file content (24 lines) | stat: -rw-r--r-- 856 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Stefano Rivera <stefanor@debian.org>
Date: Sat, 7 Oct 2017 09:38:57 +0200
Subject: Skip fsync tests when building with eatmydata

Author: Stefano Rivera <stefanor@debian.org>
Forwarded: not-needed
Last-Update: 2012-02-06
---
 lib-python/2.7/test/test_os.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib-python/2.7/test/test_os.py b/lib-python/2.7/test/test_os.py
index 6a06340..c4be901 100644
--- a/lib-python/2.7/test/test_os.py
+++ b/lib-python/2.7/test/test_os.py
@@ -654,6 +654,8 @@ class TestInvalidFD(unittest.TestCase):
         except OSError as e:
             self.assertEqual(e.errno, errno.EBADF)
         else:
+            if f.__name__.endswith('sync'):
+                return  # eatmydata won't raise an OSError
             self.fail("%r didn't raise an OSError with a bad file descriptor"
                       % f)