summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zlib.py
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-01-25 21:16:50 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-01-25 21:16:50 (GMT)
commit131c7079d3f35883f4acc0b5fb7542feccfe3560 (patch)
tree9a3f19d63d14fdd2a368e701eab36fe4e92d03d4 /Lib/test/test_zlib.py
parent9b727eca26ac97e2029dff669cf031d3ae5150c2 (diff)
downloadcpython-131c7079d3f35883f4acc0b5fb7542feccfe3560.zip
cpython-131c7079d3f35883f4acc0b5fb7542feccfe3560.tar.gz
cpython-131c7079d3f35883f4acc0b5fb7542feccfe3560.tar.bz2
Issue #13862: Relax zlib version test to avoid spurious failures.
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r--Lib/test/test_zlib.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 51a9d4b..851fbf7 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -16,12 +16,12 @@ except ImportError:
class VersionTestCase(unittest.TestCase):
def test_library_version(self):
- # On the build system, ZLIB_RUNTIME_VERSION should match ZLIB_VERSION.
- # ZLIB_RUNTIME_VERSION is the actual library version while ZLIB_VERSION
- # is the version from the header file. On the build system, the headers
- # should match with the library exactly. At runtime, only the first
- # digit is required to match.
- self.assertEqual(zlib.ZLIB_RUNTIME_VERSION, zlib.ZLIB_VERSION)
+ # Test that the major version of the actual library in use matches the
+ # major version that we were compiled against. We can't guarantee that
+ # the minor versions will match (even on the machine on which the module
+ # was compiled), and the API is stable between minor versions, so
+ # testing only the major verions avoids spurious failures.
+ self.assertEqual(zlib.ZLIB_RUNTIME_VERSION[0], zlib.ZLIB_VERSION[0])
class ChecksumTestCase(unittest.TestCase):