From 933365447bc06db325ca6ca1175b0651637aabc5 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Thu, 9 Jun 2016 11:23:09 +0200 Subject: [PATCH] create unittest for warning --- testing/test_multivol.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/testing/test_multivol.py b/testing/test_multivol.py index 9896295..7afe2ef 100644 --- a/testing/test_multivol.py +++ b/testing/test_multivol.py @@ -219,6 +219,15 @@ class MultivolGnuFormatTest(BaseTest): assert max_err < 13*1024 assert max_err_post == 0 + def test_multivol_compress_warning(self): + """ check warning being issued if compressing multivolume with w: """ + with self.assertWarns(UserWarning): + tarobj = TarFile.open("sample.tar.gz", + mode="w:gz", + format=self.tarfile_format, + max_volume_size=30000, + new_volume_handler=new_volume_handler) + def test_multivol_compress(self): ''' check creation of multiple volume when compression is on ''' -- 1.7.1