Skip to content

Commit 720586d

Browse files
committed
test_plugins: remove obsolete StringIO/BytesIO compat
1 parent 10022d6 commit 720586d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

jenkinsapi_tests/unittests/test_plugins.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
import unittest
88

9-
try:
10-
from StringIO import StringIO # python2
11-
except ImportError:
12-
from io import BytesIO as StringIO # python3
9+
from io import BytesIO
1310
import zipfile
1411

1512
from jenkinsapi.jenkins import Requester
@@ -279,7 +276,7 @@ def test_get_plugin_dependencies(self, _poll_plugins):
279276
"bla: somestuff\n"
280277
"Plugin-Dependencies: aws-java-sdk:1.10.45,aws-credentials:1.15"
281278
)
282-
downloaded_plugin = StringIO()
279+
downloaded_plugin = BytesIO()
283280
zipfile.ZipFile(downloaded_plugin, mode="w").writestr(
284281
"META-INF/MANIFEST.MF", manifest
285282
)

0 commit comments

Comments
 (0)