Commit eec5a29e authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Refactor CloudOoo tests.

- Each class now correspond to an instance with different configuration,
and possibly several test methods.
- Upgraded to more recent pypdf version.
- The code has been reviewed to reduce complexity and repetition.
- Adds documentation to all public functions, in Google style.
- Some other cosmetic changes have been made for
consistency (consistent parentheses indentation, consistent string
literal quotes), courtesy of ruff.

See merge request nexedi/slapos!1628
parent 1ad0bc4a
...@@ -26,27 +26,28 @@ ...@@ -26,27 +26,28 @@
############################################################################## ##############################################################################
from setuptools import setup, find_packages from setuptools import setup, find_packages
version = '0.0.1.dev0' version = "0.0.1.dev0"
name = 'slapos.test.cloudooo' name = "slapos.test.cloudooo"
with open("README.md") as f: with open("README.md") as f:
long_description = f.read() long_description = f.read()
setup(name=name, setup(
version=version, name=name,
description="Test for SlapOS' cloudooo", version=version,
long_description=long_description, description="Test for SlapOS' CloudOoo",
long_description_content_type='text/markdown', long_description=long_description,
maintainer="Nexedi", long_description_content_type="text/markdown",
maintainer_email="info@nexedi.com", maintainer="Nexedi",
url="https://lab.nexedi.com/nexedi/slapos", maintainer_email="info@nexedi.com",
packages=find_packages(), url="https://lab.nexedi.com/nexedi/slapos",
install_requires=[ packages=find_packages(),
'slapos.core', install_requires=[
'slapos.cookbook', "slapos.core",
'slapos.libnetworkcache', "slapos.cookbook",
'requests', "slapos.libnetworkcache",
'PyPDF2', "requests",
], "pypdf",
zip_safe=True, ],
test_suite='test', zip_safe=True,
) test_suite="test",
)
This diff is collapsed.
...@@ -410,11 +410,6 @@ eggs += ...@@ -410,11 +410,6 @@ eggs +=
# custom eggs pre-installed, not our special python interpreter. # custom eggs pre-installed, not our special python interpreter.
interpreter = python_for_test interpreter = python_for_test
# patches for eggs
patch-binary = ${patch:location}/bin/patch
PyPDF2-patches = ${:_profile_base_location_}/../../component/egg-patch/PyPDF2/0001-Custom-implementation-of-warnings.formatwarning-remo.patch#d25bb0f5dde7f3337a0a50c2f986f5c8
PyPDF2-patch-options = -p1
[eggs/scripts] [eggs/scripts]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = ${python-interpreter:eggs} eggs = ${python-interpreter:eggs}
...@@ -514,6 +509,7 @@ Pillow = 10.2.0+SlapOSPatched001 ...@@ -514,6 +509,7 @@ Pillow = 10.2.0+SlapOSPatched001
forcediphttpsadapter = 1.0.1 forcediphttpsadapter = 1.0.1
image = 1.5.25 image = 1.5.25
plantuml = 0.3.0:whl plantuml = 0.3.0:whl
pypdf = 3.6.0:whl
pysftp = 0.2.9 pysftp = 0.2.9
requests-toolbelt = 0.8.0 requests-toolbelt = 0.8.0
testfixtures = 6.11.0 testfixtures = 6.11.0
...@@ -521,6 +517,3 @@ mysqlclient = 2.1.1 ...@@ -521,6 +517,3 @@ mysqlclient = 2.1.1
paho-mqtt = 1.5.0 paho-mqtt = 1.5.0
pcpp = 1.30 pcpp = 1.30
xmltodict = 0.13.0 xmltodict = 0.13.0
# Patched eggs
PyPDF2 = 1.26.0+SlapOSPatched001
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment