File: disabled_tests.patch

package info (click to toggle)
webhelpers 1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 1,800 kB
  • ctags: 1,154
  • sloc: python: 8,309; sh: 245; makefile: 114
file content (32 lines) | stat: -rw-r--r-- 1,888 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
25
26
27
28
29
30
31
32
Description: disable some tests that fail depending on the current date/timezone
 to reproduce:
 $ export TZ=Europe/Warsaw
 $ for d in 01-01 03-01 03-02 03-27 04-02 10-30; do faketime "2011-$d UTC" python -c 'import webhelpers.date as d; print d.distance_of_time_in_words(0, 31536000)'; done
Author: Piotr Ożarowski <piotr@debian.org>
Bug-Debian: http://bugs.debian.org/629699
Forwarded: no
Last-Update: 2012-07-07

Index: webhelpers-1.3/tests/test_date.py
===================================================================
--- webhelpers-1.3.orig/tests/test_date.py
+++ webhelpers-1.3/tests/test_date.py
@@ -17,12 +17,12 @@ class TestDateHelper(WebHelpersTestCase)
         # now".  Depending on when the test is run, the interval may include a
         # leap year.  The 'try' assumes it's not a leap year, the 'except'
         # tries it again as a leap year.
-        try:
-            self.assertEqual("1 year", distance_of_time_in_words(0, 31536000))
-            self.assertEqual("1 year", distance_of_time_in_words(1, 31536001))
-        except AssertionError:  # If the intervening year contains February 29th
-            self.assertEqual("11 months and 30 days", distance_of_time_in_words(0, 31536000))
-            self.assertEqual("11 months and 30 days", distance_of_time_in_words(1, 31536001))
+        #try:
+        #    self.assertEqual("1 year", distance_of_time_in_words(0, 31536000))
+        #    self.assertEqual("1 year", distance_of_time_in_words(1, 31536001))
+        #except AssertionError:  # If the intervening year contains February 29th
+        #    self.assertEqual("11 months and 30 days", distance_of_time_in_words(0, 31536000))
+        #    self.assertEqual("11 months and 30 days", distance_of_time_in_words(1, 31536001))
          
         # Granularity is invalid
         self.assertRaises(Exception, distance_of_time_in_words, 0, 1, 'blah')