19
19
20
20
class TestDistInfo :
21
21
22
- metadata_base = DALS ("""
22
+ metadata_base = DALS (
23
+ """
23
24
Metadata-Version: 1.2
24
25
Requires-Dist: splort (==4)
25
26
Provides-Extra: baz
26
27
Requires-Dist: quux (>=1.1); extra == 'baz'
27
- """ )
28
+ """
29
+ )
28
30
29
31
@classmethod
30
32
def build_metadata (cls , ** kwargs ):
31
- lines = (
32
- '{key}: {value}\n ' .format (** locals ())
33
- for key , value in kwargs .items ()
34
- )
33
+ lines = ('{key}: {value}\n ' .format (** locals ()) for key , value in kwargs .items ())
35
34
return cls .metadata_base + '' .join (lines )
36
35
37
36
@pytest .fixture
@@ -59,8 +58,7 @@ def metadata(self, tmpdir):
59
58
60
59
def test_distinfo (self , metadata ):
61
60
dists = dict (
62
- (d .project_name , d )
63
- for d in pkg_resources .find_distributions (metadata )
61
+ (d .project_name , d ) for d in pkg_resources .find_distributions (metadata )
64
62
)
65
63
66
64
assert len (dists ) == 2 , dists
@@ -116,7 +114,7 @@ def test_tag_arguments(self, tmp_path):
116
114
def test_output_dir (self , tmp_path , keep_egg_info ):
117
115
config = "[metadata]\n name=proj\n version=42\n "
118
116
(tmp_path / "setup.cfg" ).write_text (config , encoding = "utf-8" )
119
- out = ( tmp_path / "__out" )
117
+ out = tmp_path / "__out"
120
118
out .mkdir ()
121
119
opts = ["--keep-egg-info" ] if keep_egg_info else []
122
120
run_command ("dist_info" , "--output-dir" , out , * opts , cwd = tmp_path )
@@ -133,7 +131,9 @@ class TestWheelCompatibility:
133
131
"""Make sure the .dist-info directory produced with the ``dist_info`` command
134
132
is the same as the one produced by ``bdist_wheel``.
135
133
"""
136
- SETUPCFG = DALS ("""
134
+
135
+ SETUPCFG = DALS (
136
+ """
137
137
[metadata]
138
138
name = {name}
139
139
version = {version}
@@ -149,7 +149,8 @@ class TestWheelCompatibility:
149
149
executable-name = my_package.module:function
150
150
discover =
151
151
myproj = my_package.other_module:function
152
- """ )
152
+ """
153
+ )
153
154
154
155
EGG_INFO_OPTS = [
155
156
# Related: #3088 #2872
0 commit comments