Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
39b512da
Commit
39b512da
authored
Dec 14, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corporate_identity_test: update test for python3 compatibility
parent
b0f89c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
bt5/erp5_corporate_identity_test/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityTemplateList.py
...components/test.erp5.testCorporateIdentityTemplateList.py
+4
-4
No files found.
bt5/erp5_corporate_identity_test/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityTemplateList.py
View file @
39b512da
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.Localizer.itools.i18n.accept
import
AcceptLanguage
from
Products.Localizer.itools.i18n.accept
import
AcceptLanguage
from
PIL
import
Image
from
PIL
import
Image
import
cStringIO
import
io
import
math
import
math
import
os.path
import
os.path
from
lxml.html
import
fromstring
,
tostring
from
lxml.html
import
fromstring
,
tostring
...
@@ -120,8 +120,8 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
...
@@ -120,8 +120,8 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
# http://snipplr.com/view/757/compare-two-pil-images-in-python/
# http://snipplr.com/view/757/compare-two-pil-images-in-python/
# http://effbot.org/zone/pil-comparing-images.htm
# http://effbot.org/zone/pil-comparing-images.htm
# http://effbot.org/imagingbook/image.htm
# http://effbot.org/imagingbook/image.htm
image1
=
Image
.
open
(
cStringIO
.
String
IO
(
image_data_1
))
image1
=
Image
.
open
(
io
.
Bytes
IO
(
image_data_1
))
image2
=
Image
.
open
(
cStringIO
.
String
IO
(
image_data_2
))
image2
=
Image
.
open
(
io
.
Bytes
IO
(
image_data_2
))
# image can be converted into greyscale without transparency
# image can be converted into greyscale without transparency
h1
=
image1
.
histogram
()
h1
=
image1
.
histogram
()
...
@@ -259,7 +259,7 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
...
@@ -259,7 +259,7 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
if
dump
:
if
dump
:
expected_image
.
setData
(
png
)
expected_image
.
setData
(
png
)
self
.
tic
()
self
.
tic
()
self
.
assertImageRenderingEquals
(
str
(
png
),
str
(
expected_image
.
getData
()))
self
.
assertImageRenderingEquals
(
bytes
(
png
),
bytes
(
expected_image
.
getData
()))
##############################################################################
##############################################################################
# What rendering is tested:
# What rendering is tested:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment