File: fix-tests-on-python3.4

package info (click to toggle)
python-pkginfo 1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 416 kB
  • ctags: 354
  • sloc: python: 1,487; makefile: 76
file content (19 lines) | stat: -rw-r--r-- 842 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Fix tests failing on python3.4
 This patch corrects tests that contained hard-coded check for python3.3
 where the (presumed) intent was to just test for >= 3.3.

Bug-Ubuntu: https://bugs.launchpad.net/pkginfo/+bug/1367436
Forwarded: yes 
Last-Update: 2014-09-09

--- python-pkginfo-1.1.orig/pkginfo/tests/test_installed.py
+++ python-pkginfo-1.1/pkginfo/tests/test_installed.py
@@ -41,7 +41,7 @@ class InstalledTests(unittest.TestCase):
         installed = self._makeOne(wsgiref)
         self.assertEqual(installed.package, wsgiref)
         self.assertEqual(installed.package_name, 'wsgiref')
-        if sys.version_info[:2] == (3, 3):
+        if sys.version_info[:2] >= (3, 3):
             self.assertEqual(installed.metadata_version, None)
         else:
             self.assertEqual(installed.metadata_version, '1.0')