projects/guix·blob python-team · refs

163 lines · 5.7 KiB

1From: Gordon Ball <[email protected]>
2Date: Sat, 23 Nov 2019 18:59:39 +0000
3Subject: skip tests which are sensitive to server time
4
5---
6 test/continue.t | 2 +-
7 test/export.t | 1 +
8 test/help.t | 1 +
9 test/lengthen.t | 1 +
10 test/move.t | 2 ++
11 test/run_all | 2 +-
12 test/shorten.t | 1 +
13 test/summary.t | 3 +++
14 test/tag.t | 1 +
15 test/tags.t | 1 +
16 10 files changed, 13 insertions(+), 2 deletions(-)
17
18diff --git a/test/continue.t b/test/continue.t
19index 917699e..428f714 100755
20--- a/test/continue.t
21+++ b/test/continue.t
22@@ -37,7 +37,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
23
24 from basetest import Timew, TestCase
25
26-
27+@unittest.skip("Time-of-day sensitive")
28 class TestContinue(TestCase):
29 def setUp(self):
30 """Executed before each test in the class"""
31diff --git a/test/export.t b/test/export.t
32index c6726e6..8b511ff 100755
33--- a/test/export.t
34+++ b/test/export.t
35@@ -62,6 +62,7 @@ class TestExport(TestCase):
36 expectedEnd=now_utc,
37 expectedTags=["foo"])
38
39+ @unittest.skip("flaky")
40 def test_changing_exclusion_does_not_change_flattened_intervals(self):
41 """Changing exclusions does not change flattened intervals"""
42 now = datetime.now()
43diff --git a/test/help.t b/test/help.t
44index 786def0..9ecf5e6 100755
45--- a/test/help.t
46+++ b/test/help.t
47@@ -58,6 +58,7 @@ class TestHelp(TestCase):
48 code, out2, err2 = self.t("-h")
49 self.assertEqual(out1, out2)
50
51+ @unittest.skip("flaky")
52 def test_help_with_command_should_show_man_page(self):
53 """timew help with command should show man page"""
54 code, out, err = self.t("help start")
55diff --git a/test/lengthen.t b/test/lengthen.t
56index a6f1d77..f9ab54d 100755
57--- a/test/lengthen.t
58+++ b/test/lengthen.t
59@@ -55,6 +55,7 @@ class TestLengthen(TestCase):
60 code, out, err = self.t.runError("lengthen @1 10mins")
61 self.assertIn('Cannot lengthen open interval @1', err)
62
63+ @unittest.skip("time sensitive")
64 def test_lengthen_synthetic_interval(self):
65 """Lengthen a synthetic interval."""
66 now = datetime.now()
67diff --git a/test/move.t b/test/move.t
68index 2d7fdd9..b2336f5 100755
69--- a/test/move.t
70+++ b/test/move.t
71@@ -145,6 +145,7 @@ class TestMove(TestCase):
72 expectedEnd="20170301T143000Z",
73 expectedTags=["bar"])
74
75+ @unittest.skip("time sensitive")
76 def test_move_synthetic_interval_into_exclusion(self):
77 """Move a synthetic interval into exclusion"""
78 now = datetime.now()
79@@ -175,6 +176,7 @@ class TestMove(TestCase):
80 expectedTags=[],
81 description="unmodified interval")
82
83+ @unittest.skip("time sensitive")
84 def test_move_synthetic_interval_away_from_exclusion(self):
85 """Move a synthetic interval away from exclusion"""
86 now = datetime.now()
87diff --git a/test/run_all b/test/run_all
88index ea7dd8f..afc6731 100755
89--- a/test/run_all
90+++ b/test/run_all
91@@ -14,7 +14,7 @@ from queue import Queue, Empty
92 from subprocess import call, Popen, PIPE
93 from threading import Thread
94
95-TIMEOUT = .2
96+TIMEOUT = 2.
97
98
99 def run_test(testqueue, outqueue, threadname):
100diff --git a/test/shorten.t b/test/shorten.t
101index 7058cc0..94e0067 100755
102--- a/test/shorten.t
103+++ b/test/shorten.t
104@@ -69,6 +69,7 @@ class TestShorten(TestCase):
105 self.t("move @1 20170308T113000")
106 self.t("shorten @1 5min") # Does not work.
107
108+ @unittest.skip("time sensitive")
109 def test_shorten_synthetic_interval(self):
110 """Shorten a synthetic interval."""
111 now = datetime.now()
112diff --git a/test/summary.t b/test/summary.t
113index 6fd3352..f91e992 100755
114--- a/test/summary.t
115+++ b/test/summary.t
116@@ -192,6 +192,7 @@ W10 2017-03-09 Thu @4 Tag1 8:43:08 9:38:15 0:55:07
117 1:09:03
118 """, out)
119
120+ @unittest.skip("fails w1-9")
121 def test_with_all_hint(self):
122 """Summary should work with :all hint"""
123 now = datetime.now()
124@@ -236,6 +237,7 @@ W{5} {2:%Y-%m-%d} {2:%a} @1 BAZ 10:00:00 11:00:00 1:00:00 1:00:00
125 self.assertIn("@1", out)
126 self.assertRegex(out, r'\s{30}0:00:02')
127
128+ @unittest.skip("fails w1-9")
129 def test_with_named_date_yesterday(self):
130 """Summary should work with 'yesterday'"""
131 now = datetime.now()
132@@ -260,6 +262,7 @@ W{1} {0:%Y-%m-%d} {0:%a} @3 FOO 10:00:00 11:00:00 1:00:00 1:00:00
133 {2} 1:00:00
134 """.format(yesterday, week_yesterday, " " if two_digit_week is True else "", "-" if two_digit_week is True else ""), out)
135
136+ @unittest.skip("fails w1-9")
137 def test_with_named_date_today(self):
138 """Summary should work with 'today'"""
139 now = datetime.now()
140diff --git a/test/tag.t b/test/tag.t
141index 8b2f847..21b8c16 100755
142--- a/test/tag.t
143+++ b/test/tag.t
144@@ -178,6 +178,7 @@ class TestTag(TestCase):
145 self.assertClosedInterval(j[0], expectedTags=["bar", "foo", "one"])
146 self.assertClosedInterval(j[1], expectedTags=["bar", "foo", "two"])
147
148+ @unittest.skip("time sensitive")
149 def test_tag_synthetic_interval(self):
150 """Tag a synthetic interval."""
151 now = datetime.now()
152diff --git a/test/tags.t b/test/tags.t
153index 6cfe143..4f84d06 100755
154--- a/test/tags.t
155+++ b/test/tags.t
156@@ -63,6 +63,7 @@ class TestTags(TestCase):
157 self.assertIn('foo', out)
158 self.assertIn('bar', out)
159
160+ @unittest.skip("time sensitive")
161 def test_tags_filtered(self):
162 """Test that tags command filtering excludes tags that are outside the filter range"""
163 self.t("track 20160101T0100 - 20160101T1000 foo")