summaryrefslogtreecommitdiff
path: root/tests/test_compression.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-10-25 22:54:14 +0200
committerMichał Górny <mgorny@gentoo.org>2017-10-25 22:54:14 +0200
commitb05e39d1fb283c9beff61f740e756e5a66922f0d (patch)
tree573734245a8c9733099006138a570edc4be23875 /tests/test_compression.py
parent013e7a5bf896e3a1626bf40eebfd790821e94cf2 (diff)
downloadgemato-b05e39d1fb283c9beff61f740e756e5a66922f0d.tar.gz
gemato.compression: Support getting potential compressed names
Diffstat (limited to 'tests/test_compression.py')
-rw-r--r--tests/test_compression.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_compression.py b/tests/test_compression.py
index 13c7835..820f23d 100644
--- a/tests/test_compression.py
+++ b/tests/test_compression.py
@@ -495,3 +495,16 @@ class NoCompressionTest(unittest.TestCase):
cf.write(TEST_STRING.decode('utf8'))
self.assertEqual(rf.read(), UTF16_TEST_STRING)
+
+
+class OtherUtilityTests(unittest.TestCase):
+ def test_get_potential_compressed_names(self):
+ self.assertSetEqual(frozenset(gemato.compression
+ .get_potential_compressed_names('test')),
+ frozenset([
+ 'test',
+ 'test.gz',
+ 'test.bz2',
+ 'test.lzma',
+ 'test.xz',
+ ]))