File: fix-tests.patch

package info (click to toggle)
xphyle 4.4.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,904 kB
  • sloc: python: 6,308; makefile: 205; ruby: 105
file content (30 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: Following changes are done:
		* Skip test_lorem_ipsum since lorem has not been packaged yet and it is a "test-only" dependency
		* Replace time.clock() by time.perf_counter() since the former has been removed. time.perf_counter() comes close to time.clock() while measuring performance
Author: Nilesh Patra <nilesh@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983766
Last-Update: 2021-03-19
--- a/tests/test_performance.py
+++ b/tests/test_performance.py
@@ -17,11 +17,11 @@
         self.duration = 0
 
     def __enter__(self):
-        self.start = time.clock()
+        self.start = time.perf_counter()
         return self
 
     def __exit__(self, exception_type, exception_value, traceback):
-        self.stop = time.clock()
+        self.stop = time.perf_counter()
         self.duration = self.stop - self.start
         print(self.msg.format(
             duration=self.duration,
@@ -80,6 +80,7 @@
                     list(read_lines(path, use_system=use_system))
 
 
+@pytest.mark.skip(reason="Lorem Ipsum has not been packaged, hence skipping this test")
 @pytest.mark.perf
 def test_lorem_ipsum():
     from lorem.text import TextLorem