Skip to content

Commit 9d412a8

Browse files
author
alexander.beedie
committed
add test coverage for (public) module-level consts
1 parent 01c02a8 commit 9d412a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_gzip_compliance.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,16 @@ def test_prepend_error(self):
646646
with igzip.open(self.filename, "rb") as f:
647647
f._buffer.raw._fp.prepend()
648648

649+
def test_public_consts(self):
650+
# Confirm that all of the gzip module public consts are
651+
# also accessible via igzip, for drop-in compatibility.
652+
self.assertEqual(gzip.FCOMMENT, igzip.FCOMMENT)
653+
self.assertEqual(gzip.FEXTRA, igzip.FEXTRA)
654+
self.assertEqual(gzip.FHCRC, igzip.FHCRC)
655+
self.assertEqual(gzip.FNAME, igzip.FNAME)
656+
self.assertEqual(gzip.FTEXT, igzip.FTEXT)
657+
self.assertEqual(gzip.READ, igzip.READ)
658+
self.assertEqual(gzip.WRITE, igzip.WRITE)
649659

650660
class TestOpen(BaseTest):
651661
def test_binary_modes(self):

0 commit comments

Comments
 (0)