Opened 9 years ago
Closed 9 years ago
#5332 closed defect (fixed)
Storage test fails on python3
Reported by: | spaetz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | programming | Keywords: | python3, patch |
Cc: | berkerpeksag | Parent Tickets: | 5017 |
Description
This happens running the test suite on python3 with MG v0.8 (The same error occurs in a few more tests). I don't have an easy guess as to how to fix this.
_ test_basic_storage_copy_locally _
Traceback (most recent call last):
File "/srv/media.sspaeth.de/mediagoblin/mediagoblin/tests/test_storage.py", line 284, in test_basic_storage_copy_locally
our_file.write('Testing this file')
File "/srv/media.sspaeth.de/mediagoblin/mediagoblin/storage/filestorage.py", line 35, in write
super(FileObjectAwareFile, self).write(data)
TypeError: 'str' does not support the buffer interface
Attachments (1)
Change History (8)
by , 9 years ago
Attachment: | 0001-Fix-string-related-tests-for-Python3.patch added |
---|
comment:1 by , 9 years ago
Keywords: | patch added |
---|---|
Priority: | major → minor |
comment:2 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → in_progress |
Patch looks good. I will review it more closely and commit. Thanks!
comment:3 by , 9 years ago
Owner: | removed |
---|---|
Status: | in_progress → review |
comment:4 by , 9 years ago
E File "/home/breton/src/mediagoblin/mediagoblin/tests/test_workbench.py", line 72 E our_file.write('Our file'.encode('utf-8'))) E ^ E SyntaxError: invalid syntax
I'll try to fix this now
comment:5 by , 9 years ago
I'm getting now
_____________________________________________________________________________ TestWorkbench.test_destroy_workbench _____________________________________________________________________________ Traceback (most recent call last): File "/home/breton/src/mediagoblin/mediagoblin/tests/test_workbench.py", line 55, in test_destroy_workbench tmpfile.write('lollerskates'.encode('utf-8')) TypeError: must be str, not bytes
Need to figure out how to fix it
comment:6 by , 9 years ago
Status: | review → accepted |
---|
The tests are fixed by the patch that I sent to the mailing list and that I attach here.