File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 18
18
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
19
# SOFTWARE.
20
20
21
- """Tests for the igzip CLI. Uses pytest which works better than unittest for
22
- these sort of tests. Meant to complement the gzip module compliance tests.
23
- It should improve coverage as well."""
21
+ """Tests for igzip that are not tested with the gzip_compliance tests taken
22
+ from CPython. Uses pytest which is easier to work with. Meant to complement
23
+ the gzip module compliance tests. It should improve coverage as well."""
24
24
25
25
import gzip
26
26
import io
34
34
COMPRESSED_DATA = gzip .compress (DATA )
35
35
36
36
37
+ def test_wrong_compresslevel_igzipfile ():
38
+ with pytest .raises (ValueError ) as error :
39
+ igzip .IGzipFile ("test.gz" , mode = "wb" , compresslevel = 6 )
40
+ error .match ("Compression level should be between 0 and 3" )
41
+
42
+
37
43
@pytest .mark .parametrize ("level" , range (1 , 10 ))
38
44
def test_decompress_stdin_stdout (capsysbinary , level ):
39
45
"""Test if the command line can decompress data that has been compressed
You can’t perform that action at this time.
0 commit comments