@@ -95,7 +95,6 @@ def test_write(self):
95
95
# Test multiple close() calls.
96
96
f .close ()
97
97
98
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
99
98
def test_write_read_with_pathlike_file (self ):
100
99
filename = pathlib .Path (self .filename )
101
100
with igzip .IGzipFile (filename , 'w' ) as f :
@@ -111,22 +110,18 @@ def test_write_read_with_pathlike_file(self):
111
110
# The following test_write_xy methods test that write accepts
112
111
# the corresponding bytes-like object type as input
113
112
# and that the data written equals bytes(xy) in all cases.
114
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
115
113
def test_write_memoryview (self ):
116
114
self .write_and_read_back (memoryview (data1 * 50 ))
117
115
m = memoryview (bytes (range (256 )))
118
116
data = m .cast ('B' , shape = [8 ,8 ,4 ])
119
117
self .write_and_read_back (data )
120
118
121
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
122
119
def test_write_bytearray (self ):
123
120
self .write_and_read_back (bytearray (data1 * 50 ))
124
121
125
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
126
122
def test_write_array (self ):
127
123
self .write_and_read_back (array .array ('I' , data1 * 40 ))
128
124
129
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
130
125
def test_write_incompatible_type (self ):
131
126
# Test that non-bytes-like types raise TypeError.
132
127
# Issue #21560: attempts to write incompatible types
@@ -140,15 +135,13 @@ def test_write_incompatible_type(self):
140
135
with igzip .IGzipFile (self .filename , 'rb' ) as f :
141
136
self .assertEqual (f .read (), data1 )
142
137
143
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
144
138
def test_read (self ):
145
139
self .test_write ()
146
140
# Try reading.
147
141
with igzip .IGzipFile (self .filename , 'r' ) as f :
148
142
d = f .read ()
149
143
self .assertEqual (d , data1 * 50 )
150
144
151
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
152
145
def test_read1 (self ):
153
146
self .test_write ()
154
147
blocks = []
@@ -200,7 +193,6 @@ def test_io_on_closed_object(self):
200
193
with self .assertRaises (ValueError ):
201
194
f .flush ()
202
195
203
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
204
196
def test_append (self ):
205
197
self .test_write ()
206
198
# Append to the previous file
@@ -211,7 +203,6 @@ def test_append(self):
211
203
d = f .read ()
212
204
self .assertEqual (d , (data1 * 50 ) + (data2 * 15 ))
213
205
214
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
215
206
def test_many_append (self ):
216
207
# Bug #1074261 was triggered when reading a file that contained
217
208
# many, many members. Create such a file and verify that reading it
@@ -231,7 +222,6 @@ def test_many_append(self):
231
222
if not ztxt : break
232
223
self .assertEqual (contents , b'a' * 201 )
233
224
234
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
235
225
def test_exclusive_write (self ):
236
226
with igzip .IGzipFile (self .filename , 'xb' ) as f :
237
227
f .write (data1 * 50 )
@@ -240,7 +230,6 @@ def test_exclusive_write(self):
240
230
with self .assertRaises (FileExistsError ):
241
231
igzip .IGzipFile (self .filename , 'xb' )
242
232
243
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
244
233
def test_buffered_reader (self ):
245
234
# Issue #7471: a GzipFile can be wrapped in a BufferedReader for
246
235
# performance.
@@ -252,7 +241,6 @@ def test_buffered_reader(self):
252
241
253
242
self .assertEqual (lines , 50 * data1 .splitlines (keepends = True ))
254
243
255
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
256
244
def test_readline (self ):
257
245
self .test_write ()
258
246
# Try .readline() with varying line lengths
@@ -265,7 +253,6 @@ def test_readline(self):
265
253
self .assertTrue (len (L ) <= line_length )
266
254
line_length = (line_length + 1 ) % 50
267
255
268
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
269
256
def test_readlines (self ):
270
257
self .test_write ()
271
258
# Try .readlines()
@@ -278,7 +265,6 @@ def test_readlines(self):
278
265
L = f .readlines (150 )
279
266
if L == []: break
280
267
281
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
282
268
def test_seek_read (self ):
283
269
self .test_write ()
284
270
# Try seek, read test
@@ -298,7 +284,6 @@ def test_seek_read(self):
298
284
self .assertEqual (line1 [:amount ], line2 )
299
285
f .seek (newpos ) # positive seek
300
286
301
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
302
287
def test_seek_whence (self ):
303
288
self .test_write ()
304
289
# Try seek(whence=1), read test
@@ -443,7 +428,6 @@ def test_with_open(self):
443
428
else :
444
429
self .fail ("1/0 didn't raise an exception" )
445
430
446
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
447
431
def test_zero_padded_file (self ):
448
432
with igzip .IGzipFile (self .filename , "wb" ) as f :
449
433
f .write (data1 * 50 )
@@ -475,7 +459,6 @@ def test_non_seekable_file(self):
475
459
with igzip .IGzipFile (fileobj = buf , mode = "rb" ) as f :
476
460
self .assertEqual (f .read (), uncompressed )
477
461
478
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
479
462
def test_peek (self ):
480
463
uncompressed = data1 * 200
481
464
with igzip .IGzipFile (self .filename , "wb" ) as f :
@@ -498,7 +481,6 @@ def sizes():
498
481
self .assertEqual (f .read (100 ), b'' )
499
482
self .assertEqual (nread , len (uncompressed ))
500
483
501
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
502
484
def test_textio_readlines (self ):
503
485
# Issue #10791: TextIOWrapper.readlines() fails when wrapping GzipFile.
504
486
lines = (data1 * 50 ).decode ("ascii" ).splitlines (keepends = True )
@@ -541,7 +523,6 @@ def test_fileobj_mode(self):
541
523
with g :
542
524
self .assertEqual (g .mode , igzip .WRITE )
543
525
544
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
545
526
def test_bytes_filename (self ):
546
527
str_filename = self .filename
547
528
try :
@@ -629,7 +610,6 @@ def test_prepend_error(self):
629
610
f ._buffer .raw ._fp .prepend ()
630
611
631
612
class TestOpen (BaseTest ):
632
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
633
613
def test_binary_modes (self ):
634
614
uncompressed = data1 * 50
635
615
@@ -657,7 +637,6 @@ def test_binary_modes(self):
657
637
file_data = igzip .decompress (f .read ())
658
638
self .assertEqual (file_data , uncompressed )
659
639
660
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
661
640
def test_pathlike_file (self ):
662
641
filename = pathlib .Path (self .filename )
663
642
with igzip .open (filename , "wb" ) as f :
@@ -667,7 +646,6 @@ def test_pathlike_file(self):
667
646
with igzip .open (filename ) as f :
668
647
self .assertEqual (f .read (), data1 * 51 )
669
648
670
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
671
649
def test_implicit_binary_modes (self ):
672
650
# Test implicit binary modes (no "b" or "t" in mode string).
673
651
uncompressed = data1 * 50
@@ -696,7 +674,6 @@ def test_implicit_binary_modes(self):
696
674
file_data = igzip .decompress (f .read ())
697
675
self .assertEqual (file_data , uncompressed )
698
676
699
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
700
677
def test_text_modes (self ):
701
678
uncompressed = data1 .decode ("ascii" ) * 50
702
679
uncompressed_raw = uncompressed .replace ("\n " , os .linesep )
@@ -739,7 +716,6 @@ def test_bad_params(self):
739
716
with self .assertRaises (ValueError ):
740
717
igzip .open (self .filename , "rb" , newline = "\n " )
741
718
742
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
743
719
def test_encoding (self ):
744
720
# Test non-default encoding.
745
721
uncompressed = data1 .decode ("ascii" ) * 50
@@ -752,7 +728,6 @@ def test_encoding(self):
752
728
with igzip .open (self .filename , "rt" , encoding = "utf-16" ) as f :
753
729
self .assertEqual (f .read (), uncompressed )
754
730
755
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
756
731
def test_encoding_error_handler (self ):
757
732
# Test with non-default encoding error handler.
758
733
with igzip .open (self .filename , "wb" ) as f :
@@ -761,7 +736,6 @@ def test_encoding_error_handler(self):
761
736
as f :
762
737
self .assertEqual (f .read (), "foobar" )
763
738
764
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
765
739
def test_newline (self ):
766
740
# Test with explicit newline (universal newline mode disabled).
767
741
uncompressed = data1 .decode ("ascii" ) * 50
@@ -876,7 +850,6 @@ def test_decompress_cannot_have_flags_compression(self):
876
850
self .assertEqual (out , b'' )
877
851
878
852
879
- @pytest .mark .skip (reason = "Causes a segmentation fault." )
880
853
def test_main (verbose = None ):
881
854
support .run_unittest (TestGzip , TestOpen , TestCommandLine )
882
855
0 commit comments