From: Christian Herdtweck Date: Thu, 9 Jun 2016 09:23:09 +0000 (+0200) Subject: create unittest for warning X-Git-Tag: v2.2~35^2~29 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=933365447bc06db325ca6ca1175b0651637aabc5;p=python-delta-tar create unittest for warning --- 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 '''