Skip to content

Commit 6eb31ca

Browse files
committed
tests: remove unused assigned variables
1 parent acd21d5 commit 6eb31ca

5 files changed

+7
-7
lines changed

tests/test_buffer_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def test_invalid_getitem(self):
3333
b = zstd.BufferWithSegments(b"foo", ss.pack(0, 3))
3434

3535
with self.assertRaisesRegex(IndexError, "offset must be non-negative"):
36-
test = b[-10]
36+
b[-10]
3737

3838
with self.assertRaisesRegex(IndexError, "offset must be less than 1"):
39-
test = b[1]
39+
b[1]
4040

4141
with self.assertRaisesRegex(IndexError, "offset must be less than 1"):
42-
test = b[2]
42+
b[2]
4343

4444
def test_single(self):
4545
b = zstd.BufferWithSegments(b"foo", ss.pack(0, 3))

tests/test_compressor_compress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_compress_large(self):
6969

7070
def test_negative_level(self):
7171
cctx = zstd.ZstdCompressor(level=-4)
72-
result = cctx.compress(b"foo" * 256)
72+
cctx.compress(b"foo" * 256)
7373

7474
def test_no_magic(self):
7575
params = zstd.ZstdCompressionParameters.from_level(

tests/test_compressor_stream_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_context_manager(self):
1717
with self.assertRaisesRegex(
1818
ValueError, "cannot __enter__ multiple times"
1919
):
20-
with reader as reader2:
20+
with reader:
2121
pass
2222

2323
def test_no_context_manager(self):

tests/test_data_structures_fuzzing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ def test_estimated_compression_context_size(
110110
target_length=targetlength,
111111
strategy=strategy,
112112
)
113-
size = p.estimated_compression_context_size()
113+
p.estimated_compression_context_size()

tests/test_decompressor_stream_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_context_manager(self):
1717
with self.assertRaisesRegex(
1818
ValueError, "cannot __enter__ multiple times"
1919
):
20-
with reader as reader2:
20+
with reader:
2121
pass
2222

2323
def test_not_implemented(self):

0 commit comments

Comments
 (0)