Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
7
Merge Requests
7
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
2480e5b6
Commit
2480e5b6
authored
3 years ago
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: setuptools deprecation warnings break tests
Solution: hide them in doctests
parent
95e8965a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
3 deletions
+66
-3
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+5
-0
src/zc/buildout/tests/debugging.txt
src/zc/buildout/tests/debugging.txt
+2
-2
src/zc/buildout/tests/test_all.py
src/zc/buildout/tests/test_all.py
+39
-1
src/zc/buildout/tests/test_extras.py
src/zc/buildout/tests/test_extras.py
+4
-0
src/zc/buildout/tests/test_increment.py
src/zc/buildout/tests/test_increment.py
+4
-0
zc.recipe.egg_/src/zc/recipe/egg/tests.py
zc.recipe.egg_/src/zc/recipe/egg/tests.py
+12
-0
No files found.
src/zc/buildout/testing.py
View file @
2480e5b6
...
...
@@ -608,6 +608,11 @@ python27_warning_2 = (re.compile(r'DEPRECATION: Python 2.7 reached the end of it
'https://pip.pypa.io/en/latest/development/release-process/#python-2-support\n'),
'')
easyinstall_deprecated = (re.compile(r'.*EasyInstallDeprecationWarning.*\n'),'')
setuptools_deprecated = (re.compile(r'.*SetuptoolsDeprecationWarning.*\n'),'')
pkg_resources_deprecated = (re.compile(r'.*PkgResourcesDeprecationWarning.*\n'),'')
warnings_warn = (re.compile(r'.*warnings\
.w
arn.*\n'),'')
# Setuptools now pulls in dependencies when installed.
adding_find_link = (re.compile(r"
Adding
find
link
'[^'
]
+
'"
r" from setuptools .*
\
r
?
\
n
"), '')
...
...
This diff is collapsed.
Click to expand it.
src/zc/buildout/tests/debugging.txt
View file @
2480e5b6
...
...
@@ -72,7 +72,7 @@ supply some input:
... up
... p sorted(self.options.keys())
... q
... """, with_exit_code=True), end='')
... """, with_exit_code=True), end='')
# doctest: +ELLIPSIS
Develop: '/sample-buildout/recipes'
Installing data-dir.
> /zc/buildout/buildout.py(925)__getitem__()
...
...
@@ -80,7 +80,7 @@ supply some input:
(Pdb) > /sample-buildout/recipes/mkdir.py(14)install()
-> directory = self.options['directory']
(Pdb) ['path', 'recipe']
(Pdb)
While:
...
While:
Installing data-dir.
Traceback (most recent call last):
File "/zc/buildout/buildout.py", line 1352, in main
...
...
This diff is collapsed.
Click to expand it.
src/zc/buildout/tests/test_all.py
View file @
2480e5b6
...
...
@@ -3424,6 +3424,10 @@ def test_suite():
zc
.
buildout
.
testing
.
adding_find_link
,
zc
.
buildout
.
testing
.
python27_warning
,
zc
.
buildout
.
testing
.
python27_warning_2
,
zc
.
buildout
.
testing
.
easyinstall_deprecated
,
zc
.
buildout
.
testing
.
setuptools_deprecated
,
zc
.
buildout
.
testing
.
pkg_resources_deprecated
,
zc
.
buildout
.
testing
.
warnings_warn
,
# (re.compile(r"Installing 'zc.buildout >=\S+"), ''),
(
re
.
compile
(
r'__buildout_signature__ = recipes-\
S+
'),
'
__buildout_signature__
=
recipes
-
SSSSSSSSSSS
'),
...
...
@@ -3469,6 +3473,10 @@ def test_suite():
zc.buildout.testing.normalize_egg_py,
zc.buildout.testing.not_found,
zc.buildout.testing.adding_find_link,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
# (re.compile(r"Installing '
zc
.
buildout
>=
\
S
+
"), ''),
# (re.compile(r"
Getting
distribution
for
'zc.buildout >=
\
S+
"
),
# ''),
...
...
@@ -3507,6 +3515,10 @@ def test_suite():
zc.buildout.testing.normalize_exception_type_for_python_2_and_3,
zc.buildout.testing.not_found,
zc.buildout.testing.adding_find_link,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
(re.compile('
zc
.
buildout
.
buildout
.
MissingOption
'),
'
MissingOption
'),
(re.compile(r'
\
S
+
buildout
.
py
'), '
buildout
.
py
'),
...
...
@@ -3530,6 +3542,10 @@ def test_suite():
zc.buildout.testing.normalize_egg_py,
zc.buildout.testing.not_found,
zc.buildout.testing.adding_find_link,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
normalize_bang,
normalize_S,
# (re.compile(r"Installing '
zc
.
buildout
>=
\
S
+
"), ''),
...
...
@@ -3563,6 +3579,10 @@ def test_suite():
zc.buildout.testing.not_found,
zc.buildout.testing.python27_warning,
zc.buildout.testing.python27_warning_2,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
normalize_bang,
normalize_S,
(re.compile(r'
[
-
d
]
setuptools
-
\
S
+
[.]
egg
'), '
setuptools
.
egg
'),
...
...
@@ -3587,6 +3607,10 @@ def test_suite():
zc.buildout.testing.normalize_exception_type_for_python_2_and_3,
zc.buildout.testing.not_found,
zc.buildout.testing.adding_find_link,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
(re.compile('
at
-
?
0
x
[
^>
]
+
'), '
<
MEM
ADDRESS
>
'),
(re.compile('
http
:
//
localhost
:[
0
-
9
]{
4
,
5
}
/
'),
'
http
:
//
localhost
/
'),
...
...
@@ -3610,6 +3634,10 @@ def test_suite():
zc.buildout.testing.adding_find_link,
zc.buildout.testing.python27_warning,
zc.buildout.testing.python27_warning_2,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
normalize_bang,
(re.compile(r'
^
(
\
w
+
\
.)
*
(
Missing
\
w
+
:
)
'), '
\
2
'),
(re.compile(r"buildout: Running
\
S*se
t
up.py"),
...
...
@@ -3661,6 +3689,10 @@ def test_suite():
zc
.
buildout
.
testing
.
normalize_egg_py
,
zc
.
buildout
.
testing
.
not_found
,
zc
.
buildout
.
testing
.
adding_find_link
,
zc
.
buildout
.
testing
.
easyinstall_deprecated
,
zc
.
buildout
.
testing
.
setuptools_deprecated
,
zc
.
buildout
.
testing
.
pkg_resources_deprecated
,
zc
.
buildout
.
testing
.
warnings_warn
,
(
re
.
compile
(
r'__buildout_signature__ = recipes-\
S+
'),
'
__buildout_signature__
=
recipes
-
SSSSSSSSSSS
'),
(re.compile(r'
[
-
d
]
setuptools
-
\
S
+
[.]
egg
'), '
setuptools
.
egg
'),
...
...
@@ -3712,7 +3744,13 @@ def test_suite():
test_suite.append(
manuel.testing.TestSuite(
manuel.doctest.Manuel(
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
checker=renormalizing.RENormalizing([
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
]),
) + manuel.capture.Manuel(),
os.path.join(docdir, '
getting
-
started
.
rst
'),
os.path.join(docdir, '
reference
.
rst
'),
...
...
This diff is collapsed.
Click to expand it.
src/zc/buildout/tests/test_extras.py
View file @
2480e5b6
...
...
@@ -78,6 +78,10 @@ def test_suite():
zc
.
buildout
.
testing
.
adding_find_link
,
zc
.
buildout
.
testing
.
python27_warning
,
zc
.
buildout
.
testing
.
python27_warning_2
,
zc
.
buildout
.
testing
.
easyinstall_deprecated
,
zc
.
buildout
.
testing
.
setuptools_deprecated
,
zc
.
buildout
.
testing
.
pkg_resources_deprecated
,
zc
.
buildout
.
testing
.
warnings_warn
,
normalize_bang
,
(
re
.
compile
(
r'^(\
w+
\.)*(Missing\
w+: )
'), '
\
2
'),
(re.compile(r"buildout: Running
\
S*se
t
up.py"),
...
...
This diff is collapsed.
Click to expand it.
src/zc/buildout/tests/test_increment.py
View file @
2480e5b6
...
...
@@ -406,6 +406,10 @@ def test_suite():
zc
.
buildout
.
testing
.
adding_find_link
,
zc
.
buildout
.
testing
.
python27_warning
,
zc
.
buildout
.
testing
.
python27_warning_2
,
zc
.
buildout
.
testing
.
easyinstall_deprecated
,
zc
.
buildout
.
testing
.
setuptools_deprecated
,
zc
.
buildout
.
testing
.
pkg_resources_deprecated
,
zc
.
buildout
.
testing
.
warnings_warn
,
normalize_bang
,
(
re
.
compile
(
r'^(\
w+
\.)*(Missing\
w+: )
'), '
\
2
'),
(re.compile(r"buildout: Running
\
S*se
t
up.py"),
...
...
This diff is collapsed.
Click to expand it.
zc.recipe.egg_/src/zc/recipe/egg/tests.py
View file @
2480e5b6
...
...
@@ -51,6 +51,10 @@ def test_suite():
zc
.
buildout
.
testing
.
not_found
,
zc
.
buildout
.
testing
.
python27_warning
,
zc
.
buildout
.
testing
.
python27_warning_2
,
zc
.
buildout
.
testing
.
easyinstall_deprecated
,
zc
.
buildout
.
testing
.
setuptools_deprecated
,
zc
.
buildout
.
testing
.
pkg_resources_deprecated
,
zc
.
buildout
.
testing
.
warnings_warn
,
(
re
.
compile
(
r'[d-] zc.buildout(-\
S+)?[.]egg(-li
nk)?'
),
'zc.buildout.egg'
),
(
re
.
compile
(
r'[d-] setuptools-[^-]+-'
),
'setuptools-X-'
),
...
...
@@ -69,6 +73,10 @@ def test_suite():
zc
.
buildout
.
testing
.
not_found
,
zc
.
buildout
.
testing
.
python27_warning
,
zc
.
buildout
.
testing
.
python27_warning_2
,
zc
.
buildout
.
testing
.
easyinstall_deprecated
,
zc
.
buildout
.
testing
.
setuptools_deprecated
,
zc
.
buildout
.
testing
.
pkg_resources_deprecated
,
zc
.
buildout
.
testing
.
warnings_warn
,
(
re
.
compile
(
'__buildout_signature__ = '
r'sample-\
S+
\s+'
r'zc.recipe.egg-\
S+
\s+'
...
...
@@ -105,6 +113,10 @@ def test_suite():
zc.buildout.testing.not_found,
zc.buildout.testing.python27_warning,
zc.buildout.testing.python27_warning_2,
zc.buildout.testing.easyinstall_deprecated,
zc.buildout.testing.setuptools_deprecated,
zc.buildout.testing.pkg_resources_deprecated,
zc.buildout.testing.warnings_warn,
(re.compile("(d ((ext)?demo(needed)?|other)"
r"-
\
d[.]
\
d-py)
\
d[.]
\
d(-
\
S+)?[.]egg
"
),
'
\\
1
V
.
V
.
egg
'),
...
...
This diff is collapsed.
Click to expand it.
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