Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Léo-Paul Géneau
slapos
Commits
f5929506
Commit
f5929506
authored
Sep 05, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/erp5/test: drop python2 support
we'll only run the test on python3
parent
d0bb606d
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
103 deletions
+83
-103
software/erp5/test/setup.py
software/erp5/test/setup.py
+0
-2
software/erp5/test/test/__init__.py
software/erp5/test/test/__init__.py
+0
-1
software/erp5/test/test/test_balancer.py
software/erp5/test/test/test_balancer.py
+40
-48
software/erp5/test/test/test_erp5.py
software/erp5/test/test/test_erp5.py
+35
-41
software/erp5/test/test/test_mariadb.py
software/erp5/test/test/test_mariadb.py
+7
-9
software/erp5/test/test/test_wcfs.py
software/erp5/test/test/test_wcfs.py
+1
-2
No files found.
software/erp5/test/setup.py
View file @
f5929506
...
...
@@ -24,7 +24,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
__future__
import
absolute_import
from
setuptools
import
setup
,
find_packages
version
=
'0.0.1.dev0'
...
...
@@ -49,7 +48,6 @@ setup(name=name,
'psutil'
,
'requests'
,
'mysqlclient'
,
'backports.lzma'
,
'cryptography'
,
'pexpect'
,
'pyOpenSSL'
,
...
...
software/erp5/test/test/__init__.py
View file @
f5929506
...
...
@@ -25,7 +25,6 @@
#
##############################################################################
from
__future__
import
absolute_import
import
json
import
os
...
...
software/erp5/test/test/test_balancer.py
View file @
f5929506
This diff is collapsed.
Click to expand it.
software/erp5/test/test/test_erp5.py
View file @
f5929506
This diff is collapsed.
Click to expand it.
software/erp5/test/test/test_mariadb.py
View file @
f5929506
##############################################################################
# coding: utf-8
#
# Copyright (c) 2018 Nexedi SA and Contributors. All Rights Reserved.
#
...
...
@@ -26,11 +25,10 @@
#
##############################################################################
from
__future__
import
absolute_import
import
os
import
json
import
glob
import
six.moves.
urllib.parse
import
urllib.parse
import
socket
import
sys
import
time
...
...
@@ -39,7 +37,7 @@ import datetime
import
subprocess
import
gzip
from
backports
import
lzma
import
lzma
import
MySQLdb
from
slapos.testing.utils
import
CrontabMixin
...
...
@@ -84,7 +82,7 @@ class MariaDBTestCase(ERP5InstanceTestCase):
# type: () -> MySQLdb.connections.Connection
connection_parameter_dict
=
json
.
loads
(
self
.
computer_partition
.
getConnectionParameterDict
()[
'_'
])
db_url
=
six
.
moves
.
urllib
.
parse
.
urlparse
(
connection_parameter_dict
[
'database-list'
][
0
])
db_url
=
urllib
.
parse
.
urlparse
(
connection_parameter_dict
[
'database-list'
][
0
])
self
.
assertEqual
(
'mysql'
,
db_url
.
scheme
)
self
.
assertTrue
(
db_url
.
path
.
startswith
(
'/'
))
...
...
@@ -208,7 +206,7 @@ class TestMariaDB(MariaDBTestCase):
"""
select * from test_utf8_collation where col1 = "a"
"""
)
self
.
assertEqual
(((
u
'à'
,),),
cnx
.
store_result
().
fetch_row
(
maxrows
=
2
))
self
.
assertEqual
(((
'à'
,),),
cnx
.
store_result
().
fetch_row
(
maxrows
=
2
))
class
TestMroonga
(
MariaDBTestCase
):
...
...
@@ -232,7 +230,7 @@ class TestMroonga(MariaDBTestCase):
SELECT mroonga_normalize("ABCDあぃうぇ㍑")
"""
)
# XXX this is returned as bytes by mroonga/mariadb (this might be a bug)
self
.
assertEqual
(((
u'abcdあぃうぇリットル'
.
encode
(
'utf-8'
),),),
self
.
assertEqual
(((
'abcdあぃうぇリットル'
.
encode
(
),),),
cnx
.
store_result
().
fetch_row
(
maxrows
=
2
))
if
0
:
...
...
@@ -245,7 +243,7 @@ class TestMroonga(MariaDBTestCase):
"""
SELECT mroonga_normalize("aBcDあぃウェ㍑", "NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark")
"""
)
self
.
assertEqual
(((
u'ABCDあぃうぇ㍑'
.
encode
(
'utf-8'
),),),
self
.
assertEqual
(((
'ABCDあぃうぇ㍑'
.
encode
(
),),),
cnx
.
store_result
().
fetch_row
(
maxrows
=
2
))
def
test_mroonga_full_text_normalizer
(
self
):
...
...
@@ -282,7 +280,7 @@ class TestMroonga(MariaDBTestCase):
WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE)
"""
)
self
.
assertEqual
(
((
datetime
.
date
(
2013
,
4
,
23
),
u
'ブラックコーヒーを飲んだ。'
),),
((
datetime
.
date
(
2013
,
4
,
23
),
'ブラックコーヒーを飲んだ。'
),),
cnx
.
store_result
().
fetch_row
(
maxrows
=
2
),
)
...
...
software/erp5/test/test/test_wcfs.py
View file @
f5929506
...
...
@@ -16,7 +16,6 @@
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
from
__future__
import
absolute_import
import
json
import
os.path
import
unittest
...
...
@@ -76,5 +75,5 @@ def lookupMount(zurl):
# readfile returns content of file @path.
def
readfile
(
path
):
with
open
(
path
,
'r'
)
as
f
:
with
open
(
path
)
as
f
:
return
f
.
read
()
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