Skip to content

Commit

Permalink
⚫ Fade to black.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 14, 2023
1 parent 245da54 commit 310a41c
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions setuptools/tests/test_dist_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@

class TestDistInfo:

metadata_base = DALS("""
metadata_base = DALS(
"""
Metadata-Version: 1.2
Requires-Dist: splort (==4)
Provides-Extra: baz
Requires-Dist: quux (>=1.1); extra == 'baz'
""")
"""
)

@classmethod
def build_metadata(cls, **kwargs):
lines = (
'{key}: {value}\n'.format(**locals())
for key, value in kwargs.items()
)
lines = ('{key}: {value}\n'.format(**locals()) for key, value in kwargs.items())
return cls.metadata_base + ''.join(lines)

@pytest.fixture
Expand Down Expand Up @@ -59,8 +58,7 @@ def metadata(self, tmpdir):

def test_distinfo(self, metadata):
dists = dict(
(d.project_name, d)
for d in pkg_resources.find_distributions(metadata)
(d.project_name, d) for d in pkg_resources.find_distributions(metadata)
)

assert len(dists) == 2, dists
Expand Down Expand Up @@ -116,7 +114,7 @@ def test_tag_arguments(self, tmp_path):
def test_output_dir(self, tmp_path, keep_egg_info):
config = "[metadata]\nname=proj\nversion=42\n"
(tmp_path / "setup.cfg").write_text(config, encoding="utf-8")
out = (tmp_path / "__out")
out = tmp_path / "__out"
out.mkdir()
opts = ["--keep-egg-info"] if keep_egg_info else []
run_command("dist_info", "--output-dir", out, *opts, cwd=tmp_path)
Expand All @@ -133,7 +131,9 @@ class TestWheelCompatibility:
"""Make sure the .dist-info directory produced with the ``dist_info`` command
is the same as the one produced by ``bdist_wheel``.
"""
SETUPCFG = DALS("""

SETUPCFG = DALS(
"""
[metadata]
name = {name}
version = {version}
Expand All @@ -149,7 +149,8 @@ class TestWheelCompatibility:
executable-name = my_package.module:function
discover =
myproj = my_package.other_module:function
""")
"""
)

EGG_INFO_OPTS = [
# Related: #3088 #2872
Expand Down

0 comments on commit 310a41c

Please sign in to comment.