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
4c62d634
Commit
4c62d634
authored
May 16, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test to create separate subpackages. Hoping that avoids issues with caching.
parent
7681ff9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
setuptools/tests/test_config.py
setuptools/tests/test_config.py
+8
-10
No files found.
setuptools/tests/test_config.py
View file @
4c62d634
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
import
sys
import
contextlib
import
pytest
...
...
@@ -291,28 +290,27 @@ class TestMetadata:
with
get_dist
(
tmpdir
)
as
dist
:
assert
dist
.
metadata
.
version
==
'1'
sub
pack
=
tmpdir
.
join
(
'fake_package'
).
mkdir
(
'subpackage
'
)
sub
pack
.
join
(
'__init__.py'
).
write
(
''
)
sub
pack
.
join
(
'submodule
.py'
).
write
(
'VERSION = (2016, 11, 26)'
)
sub
_a
=
tmpdir
.
join
(
'fake_package'
).
mkdir
(
'subpkg_a
'
)
sub
_a
.
join
(
'__init__.py'
).
write
(
''
)
sub
_a
.
join
(
'mod
.py'
).
write
(
'VERSION = (2016, 11, 26)'
)
config
.
write
(
'[metadata]
\
n
'
'version = attr: fake_package.subp
ackage.submodule
.VERSION
\
n
'
'version = attr: fake_package.subp
kg_a.mod
.VERSION
\
n
'
)
with
get_dist
(
tmpdir
)
as
dist
:
assert
dist
.
metadata
.
version
==
'2016.11.26'
del
sys
.
modules
[
'fake_package'
]
del
sys
.
modules
[
'fake_package.subpackage'
]
subpack
.
join
(
'othersub.py'
).
write
(
sub_b
=
tmpdir
.
join
(
'fake_package'
).
mkdir
(
'subpkg_b'
)
sub_b
.
join
(
'__init__.py'
).
write
(
''
)
sub_b
.
join
(
'mod.py'
).
write
(
'import third_party_module
\
n
'
'VERSION = (2016, 11, 26)'
)
config
.
write
(
'[metadata]
\
n
'
'version = attr: fake_package.subp
ackage.othersub
.VERSION
\
n
'
'version = attr: fake_package.subp
kg_b.mod
.VERSION
\
n
'
)
with
get_dist
(
tmpdir
)
as
dist
:
assert
dist
.
metadata
.
version
==
'2016.11.26'
...
...
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