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
648dfe5a
Commit
648dfe5a
authored
Oct 28, 2019
by
Mick Koch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove DALS for single-line strings
parent
823ab9d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
40 deletions
+40
-40
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+40
-40
No files found.
setuptools/tests/test_egg_info.py
View file @
648dfe5a
...
@@ -524,27 +524,27 @@ class TestEggInfo:
...
@@ -524,27 +524,27 @@ class TestEggInfo:
[metadata]
[metadata]
license_file = LICENSE
license_file = LICENSE
"""
),
"""
),
'LICENSE'
:
DALS
(
"Test license"
)
'LICENSE'
:
"Test license"
},
True
),
# with license
},
True
),
# with license
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
[metadata]
[metadata]
license_file = INVALID_LICENSE
license_file = INVALID_LICENSE
"""
),
"""
),
'LICENSE'
:
DALS
(
"Test license"
)
'LICENSE'
:
"Test license"
},
False
),
# with an invalid license
},
False
),
# with an invalid license
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
"""
),
"""
),
'LICENSE'
:
DALS
(
"Test license"
)
'LICENSE'
:
"Test license"
},
False
),
# no license_file attribute
},
False
),
# no license_file attribute
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
[metadata]
[metadata]
license_file = LICENSE
license_file = LICENSE
"""
),
"""
),
'MANIFEST.in'
:
DALS
(
"exclude LICENSE"
)
,
'MANIFEST.in'
:
"exclude LICENSE"
,
'LICENSE'
:
DALS
(
"Test license"
)
'LICENSE'
:
"Test license"
},
False
)
# license file is manually excluded
},
False
)
# license file is manually excluded
])
])
def
test_setup_cfg_license_file
(
def
test_setup_cfg_license_file
(
...
@@ -575,16 +575,16 @@ class TestEggInfo:
...
@@ -575,16 +575,16 @@ class TestEggInfo:
LICENSE-ABC
LICENSE-ABC
LICENSE-XYZ
LICENSE-XYZ
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
],
[]),
# with licenses
},
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
],
[]),
# with licenses
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
[metadata]
[metadata]
license_files = LICENSE-ABC, LICENSE-XYZ
license_files = LICENSE-ABC, LICENSE-XYZ
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
],
[]),
# with commas
},
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
],
[]),
# with commas
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -592,24 +592,24 @@ class TestEggInfo:
...
@@ -592,24 +592,24 @@ class TestEggInfo:
license_files =
license_files =
LICENSE-ABC
LICENSE-ABC
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
],
[
'LICENSE-XYZ'
]),
# with one license
},
[
'LICENSE-ABC'
],
[
'LICENSE-XYZ'
]),
# with one license
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
[metadata]
[metadata]
license_files =
license_files =
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# empty
},
[],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# empty
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
[metadata]
[metadata]
license_files = LICENSE-XYZ
license_files = LICENSE-XYZ
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-XYZ'
],
[
'LICENSE-ABC'
]),
# on same line
},
[
'LICENSE-XYZ'
],
[
'LICENSE-ABC'
]),
# on same line
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -618,20 +618,20 @@ class TestEggInfo:
...
@@ -618,20 +618,20 @@ class TestEggInfo:
LICENSE-ABC
LICENSE-ABC
INVALID_LICENSE
INVALID_LICENSE
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"Test license"
)
'LICENSE-ABC'
:
"Test license"
},
[
'LICENSE-ABC'
],
[
'INVALID_LICENSE'
]),
# with an invalid license
},
[
'LICENSE-ABC'
],
[
'INVALID_LICENSE'
]),
# with an invalid license
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
"""
),
"""
),
'LICENSE'
:
DALS
(
"Test license"
)
'LICENSE'
:
"Test license"
},
[],
[
'LICENSE'
]),
# no license_files attribute
},
[],
[
'LICENSE'
]),
# no license_files attribute
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
[metadata]
[metadata]
license_files = LICENSE
license_files = LICENSE
"""
),
"""
),
'MANIFEST.in'
:
DALS
(
"exclude LICENSE"
)
,
'MANIFEST.in'
:
"exclude LICENSE"
,
'LICENSE'
:
DALS
(
"Test license"
)
'LICENSE'
:
"Test license"
},
[],
[
'LICENSE'
]),
# license file is manually excluded
},
[],
[
'LICENSE'
]),
# license file is manually excluded
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -640,9 +640,9 @@ class TestEggInfo:
...
@@ -640,9 +640,9 @@ class TestEggInfo:
LICENSE-ABC
LICENSE-ABC
LICENSE-XYZ
LICENSE-XYZ
"""
),
"""
),
'MANIFEST.in'
:
DALS
(
"exclude LICENSE-XYZ"
)
,
'MANIFEST.in'
:
"exclude LICENSE-XYZ"
,
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
],
[
'LICENSE-XYZ'
])
# subset is manually excluded
},
[
'LICENSE-ABC'
],
[
'LICENSE-XYZ'
])
# subset is manually excluded
])
])
def
test_setup_cfg_license_files
(
def
test_setup_cfg_license_files
(
...
@@ -672,8 +672,8 @@ class TestEggInfo:
...
@@ -672,8 +672,8 @@ class TestEggInfo:
license_file =
license_file =
license_files =
license_files =
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# both empty
},
[],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# both empty
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -682,8 +682,8 @@ class TestEggInfo:
...
@@ -682,8 +682,8 @@ class TestEggInfo:
LICENSE-ABC
LICENSE-ABC
LICENSE-XYZ
LICENSE-XYZ
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# license_file is still singular
},
[],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# license_file is still singular
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -693,9 +693,9 @@ class TestEggInfo:
...
@@ -693,9 +693,9 @@ class TestEggInfo:
LICENSE-XYZ
LICENSE-XYZ
LICENSE-PQR
LICENSE-PQR
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-PQR'
:
DALS
(
"PQR license"
)
,
'LICENSE-PQR'
:
"PQR license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
,
'LICENSE-PQR'
,
'LICENSE-XYZ'
],
[]),
# combined
},
[
'LICENSE-ABC'
,
'LICENSE-PQR'
,
'LICENSE-XYZ'
],
[]),
# combined
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -706,9 +706,9 @@ class TestEggInfo:
...
@@ -706,9 +706,9 @@ class TestEggInfo:
LICENSE-XYZ
LICENSE-XYZ
LICENSE-PQR
LICENSE-PQR
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-PQR'
:
DALS
(
"PQR license"
)
,
'LICENSE-PQR'
:
"PQR license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
,
'LICENSE-PQR'
,
'LICENSE-XYZ'
],
[]),
# duplicate license
},
[
'LICENSE-ABC'
,
'LICENSE-PQR'
,
'LICENSE-XYZ'
],
[]),
# duplicate license
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -717,9 +717,9 @@ class TestEggInfo:
...
@@ -717,9 +717,9 @@ class TestEggInfo:
license_files =
license_files =
LICENSE-XYZ
LICENSE-XYZ
"""
),
"""
),
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-PQR'
:
DALS
(
"PQR license"
)
,
'LICENSE-PQR'
:
"PQR license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
],
[
'LICENSE-PQR'
]),
# combined subset
},
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
],
[
'LICENSE-PQR'
]),
# combined subset
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -729,7 +729,7 @@ class TestEggInfo:
...
@@ -729,7 +729,7 @@ class TestEggInfo:
LICENSE-XYZ
LICENSE-XYZ
LICENSE-PQR
LICENSE-PQR
"""
),
"""
),
'LICENSE-PQR'
:
DALS
(
"Test license"
)
'LICENSE-PQR'
:
"Test license"
},
[
'LICENSE-PQR'
],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# with invalid licenses
},
[
'LICENSE-PQR'
],
[
'LICENSE-ABC'
,
'LICENSE-XYZ'
]),
# with invalid licenses
({
({
'setup.cfg'
:
DALS
(
"""
'setup.cfg'
:
DALS
(
"""
...
@@ -739,10 +739,10 @@ class TestEggInfo:
...
@@ -739,10 +739,10 @@ class TestEggInfo:
LICENSE-PQR
LICENSE-PQR
LICENSE-XYZ
LICENSE-XYZ
"""
),
"""
),
'MANIFEST.in'
:
DALS
(
"exclude LICENSE-ABC
\
n
exclude LICENSE-PQR"
)
,
'MANIFEST.in'
:
"exclude LICENSE-ABC
\
n
exclude LICENSE-PQR"
,
'LICENSE-ABC'
:
DALS
(
"ABC license"
)
,
'LICENSE-ABC'
:
"ABC license"
,
'LICENSE-PQR'
:
DALS
(
"PQR license"
)
,
'LICENSE-PQR'
:
"PQR license"
,
'LICENSE-XYZ'
:
DALS
(
"XYZ license"
)
'LICENSE-XYZ'
:
"XYZ license"
},
[
'LICENSE-XYZ'
],
[
'LICENSE-ABC'
,
'LICENSE-PQR'
])
# manually excluded
},
[
'LICENSE-XYZ'
],
[
'LICENSE-ABC'
,
'LICENSE-PQR'
])
# manually excluded
])
])
def
test_setup_cfg_license_file_license_files
(
def
test_setup_cfg_license_file_license_files
(
...
...
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