Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
Jérome Perrin
setuptools
Commits
46b76edc
Commit
46b76edc
authored
Apr 20, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract method for validating the order.
parent
c4d546e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+14
-8
No files found.
setuptools/tests/test_egg_info.py
View file @
46b76edc
...
...
@@ -83,10 +83,18 @@ class TestEggInfo(object):
assert
'tag_date = 0'
in
content
assert
'tag_svn_revision = 0'
in
content
if
sys
.
version_info
>=
(
2
,
7
):
assert
re
.
search
(
'tag_date.*tag_svn_revision.*tag_build'
,
content
,
re
.
MULTILINE
|
re
.
DOTALL
)
is
not
None
expected_order
=
'tag_date'
,
'tag_svn_revision'
,
'tag_build'
self
.
_validate_content_order
(
content
,
expected_order
)
@
staticmethod
def
_validate_content_order
(
content
,
expected_order
):
if
sys
.
version_info
<
(
2
,
7
):
# order cannot be guaranteed on Python 2.6
return
pattern
=
'.*'
.
join
(
expected_order
)
flags
=
re
.
MULTILINE
|
re
.
DOTALL
assert
re
.
search
(
pattern
,
content
,
flags
)
def
test_egg_info_save_version_info_setup_defaults
(
self
,
tmpdir_cwd
,
env
):
setup_cfg
=
os
.
path
.
join
(
env
.
paths
[
'home'
],
'setup.cfg'
)
...
...
@@ -111,10 +119,8 @@ class TestEggInfo(object):
assert
'tag_date = 0'
in
content
assert
'tag_svn_revision = 0'
in
content
if
sys
.
version_info
>=
(
2
,
7
):
assert
re
.
search
(
'tag_build.*tag_date.*tag_svn_revision'
,
content
,
re
.
MULTILINE
|
re
.
DOTALL
)
is
not
None
expected_order
=
'tag_build'
,
'tag_date'
,
'tag_svn_revision'
self
.
_validate_content_order
(
content
,
expected_order
)
def
test_egg_base_installed_egg_info
(
self
,
tmpdir_cwd
,
env
):
self
.
_create_project
()
...
...
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