Skip to content

Commit 266ff55

Browse files
committed
Remove useless test in Python 3
1 parent 9178e63 commit 266ff55

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

tests/test_api.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import uuid
3030
import warnings
3131

32-
from shotgun_api3.lib import six
3332
from shotgun_api3.lib.httplib2 import Http
3433

3534
# To mock the correct exception when testion on Python 2 and 3, use the
@@ -272,44 +271,6 @@ def test_upload_download(self):
272271
"sg_uploaded_movie",
273272
tag_list="monkeys, everywhere, send, help",
274273
)
275-
if six.PY2:
276-
# In Python2, make sure that non-utf-8 encoded paths raise when they
277-
# can't be converted to utf-8. For Python3, we'll skip these tests
278-
# since string encoding is handled differently.
279-
280-
# We need to touch the file we're going to test with first. We can't
281-
# bundle a file with this filename in the repo due to some pip install
282-
# problems on Windows. Note that the path below is utf-8 encoding of
283-
# what we'll eventually encode as shift-jis.
284-
file_path_s = os.path.join(this_dir, "./\xe3\x81\x94.shift-jis")
285-
file_path_u = file_path_s.decode("utf-8")
286-
287-
with open(
288-
file_path_u if sys.platform.startswith("win") else file_path_s, "w"
289-
) as fh:
290-
fh.write("This is just a test file with some random data in it.")
291-
292-
self.assertRaises(
293-
shotgun_api3.ShotgunError,
294-
self.sg.upload,
295-
"Version",
296-
self.version["id"],
297-
file_path_u.encode("shift-jis"),
298-
"sg_uploaded_movie",
299-
tag_list="monkeys, everywhere, send, help",
300-
)
301-
302-
# But it should work in all cases if a unicode string is used.
303-
self.sg.upload(
304-
"Version",
305-
self.version["id"],
306-
file_path_u,
307-
"sg_uploaded_movie",
308-
tag_list="monkeys, everywhere, send, help",
309-
)
310-
311-
# cleanup
312-
os.remove(file_path_u)
313274

314275
# cleanup
315276
os.remove(file_path)

0 commit comments

Comments
 (0)