Skip to content

Commit eeed123

Browse files
committed
prune unnecessary code
1 parent c15c3b4 commit eeed123

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

tests/test_rwx.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ def test_write_not_fail(write_fail_mock):
126126
('gnutar', 'a_string'.encode()),
127127
('pax', json.dumps({'a': 1, 'b': 2, 'c': 3}).encode())])
128128
def test_adding_entry_from_memory(archfmt, data_bytes):
129-
if sys.version_info[0] < 3:
130-
string_types = (str, unicode) # noqa: F821
131-
else:
132-
string_types = (str,)
133-
134129
entry_path = 'testfile.data'
135130

136131
# entry_data must be a list of byte-like objects for maximum compatibility
@@ -152,11 +147,7 @@ def write_callback(data):
152147
buf = b''.join(blocks)
153148
with libarchive.memory_reader(buf) as memory_archive:
154149
for archive_entry in memory_archive:
155-
expected = b''.join(
156-
[a.encode()
157-
if isinstance(a, string_types)
158-
else a for a in entry_data],
159-
)
150+
expected = b''.join(entry_data)
160151
actual = b''.join(
161152
archive_entry.get_blocks(),
162153
)

0 commit comments

Comments
 (0)