@@ -52,68 +52,68 @@ def poetry(config: Config) -> Poetry:
5252
5353
5454def test_bundler_should_build_a_new_venv_with_existing_python (
55- io : BufferedIO , tmp_dir : str , poetry : Poetry , mocker : MockerFixture
55+ io : BufferedIO , tmpdir : str , poetry : Poetry , mocker : MockerFixture
5656):
57- shutil .rmtree (tmp_dir )
57+ shutil .rmtree (tmpdir )
5858 mocker .patch ("poetry.installation.executor.Executor._execute_operation" )
5959
6060 bundler = VenvBundler ()
61- bundler .set_path (Path (tmp_dir ))
61+ bundler .set_path (Path (tmpdir ))
6262
6363 assert bundler .bundle (poetry , io )
6464
6565 python_version = "." .join (str (v ) for v in sys .version_info [:3 ])
6666 expected = f"""\
67- • Bundling simple-project (1.2.3) into { tmp_dir }
68- • Bundling simple-project (1.2.3) into { tmp_dir } : Creating a virtual environment using Python { python_version }
69- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing dependencies
70- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing simple-project (1.2.3)
71- • Bundled simple-project (1.2.3) into { tmp_dir }
67+ • Bundling simple-project (1.2.3) into { tmpdir }
68+ • Bundling simple-project (1.2.3) into { tmpdir } : Creating a virtual environment using Python { python_version }
69+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing dependencies
70+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing simple-project (1.2.3)
71+ • Bundled simple-project (1.2.3) into { tmpdir }
7272""" # noqa: E501
7373 assert expected == io .fetch_output ()
7474
7575
7676def test_bundler_should_build_a_new_venv_with_given_executable (
77- io : BufferedIO , tmp_dir : str , poetry : Poetry , mocker : MockerFixture
77+ io : BufferedIO , tmpdir : str , poetry : Poetry , mocker : MockerFixture
7878):
79- shutil .rmtree (tmp_dir )
79+ shutil .rmtree (tmpdir )
8080 mocker .patch ("poetry.installation.executor.Executor._execute_operation" )
8181
8282 bundler = VenvBundler ()
83- bundler .set_path (Path (tmp_dir ))
83+ bundler .set_path (Path (tmpdir ))
8484 bundler .set_executable (sys .executable )
8585
8686 assert bundler .bundle (poetry , io )
8787
8888 python_version = "." .join (str (v ) for v in sys .version_info [:3 ])
8989 expected = f"""\
90- • Bundling simple-project (1.2.3) into { tmp_dir }
91- • Bundling simple-project (1.2.3) into { tmp_dir } : Creating a virtual environment using Python { python_version }
92- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing dependencies
93- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing simple-project (1.2.3)
94- • Bundled simple-project (1.2.3) into { tmp_dir }
90+ • Bundling simple-project (1.2.3) into { tmpdir }
91+ • Bundling simple-project (1.2.3) into { tmpdir } : Creating a virtual environment using Python { python_version }
92+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing dependencies
93+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing simple-project (1.2.3)
94+ • Bundled simple-project (1.2.3) into { tmpdir }
9595""" # noqa: E501
9696 assert expected == io .fetch_output ()
9797
9898
9999def test_bundler_should_build_a_new_venv_if_existing_venv_is_incompatible (
100- io : BufferedIO , tmp_dir : str , poetry : Poetry , mocker : MockerFixture
100+ io : BufferedIO , tmpdir : str , poetry : Poetry , mocker : MockerFixture
101101):
102102 mocker .patch ("poetry.installation.executor.Executor._execute_operation" )
103103
104104 bundler = VenvBundler ()
105- bundler .set_path (Path (tmp_dir ))
105+ bundler .set_path (Path (tmpdir ))
106106
107107 assert bundler .bundle (poetry , io )
108108
109109 python_version = "." .join (str (v ) for v in sys .version_info [:3 ])
110110 expected = f"""\
111- • Bundling simple-project (1.2.3) into { tmp_dir }
112- • Bundling simple-project (1.2.3) into { tmp_dir } : Removing existing virtual environment
113- • Bundling simple-project (1.2.3) into { tmp_dir } : Creating a virtual environment using Python { python_version }
114- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing dependencies
115- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing simple-project (1.2.3)
116- • Bundled simple-project (1.2.3) into { tmp_dir }
111+ • Bundling simple-project (1.2.3) into { tmpdir }
112+ • Bundling simple-project (1.2.3) into { tmpdir } : Removing existing virtual environment
113+ • Bundling simple-project (1.2.3) into { tmpdir } : Creating a virtual environment using Python { python_version }
114+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing dependencies
115+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing simple-project (1.2.3)
116+ • Bundled simple-project (1.2.3) into { tmpdir }
117117""" # noqa: E501
118118 assert expected == io .fetch_output ()
119119
@@ -164,25 +164,25 @@ def test_bundler_should_remove_an_existing_venv_if_forced(
164164
165165
166166def test_bundler_should_fail_when_installation_fails (
167- io : BufferedIO , tmp_dir : str , poetry : Poetry , mocker : MockerFixture
167+ io : BufferedIO , tmpdir : str , poetry : Poetry , mocker : MockerFixture
168168):
169169 mocker .patch (
170170 "poetry.installation.executor.Executor._do_execute_operation" ,
171171 side_effect = Exception (),
172172 )
173173
174174 bundler = VenvBundler ()
175- bundler .set_path (Path (tmp_dir ))
175+ bundler .set_path (Path (tmpdir ))
176176
177177 assert not bundler .bundle (poetry , io )
178178
179179 python_version = "." .join (str (v ) for v in sys .version_info [:3 ])
180180 expected = f"""\
181- • Bundling simple-project (1.2.3) into { tmp_dir }
182- • Bundling simple-project (1.2.3) into { tmp_dir } : Removing existing virtual environment
183- • Bundling simple-project (1.2.3) into { tmp_dir } : Creating a virtual environment using Python { python_version }
184- • Bundling simple-project (1.2.3) into { tmp_dir } : Installing dependencies
185- • Bundling simple-project (1.2.3) into { tmp_dir } : Failed at step Installing dependencies
181+ • Bundling simple-project (1.2.3) into { tmpdir }
182+ • Bundling simple-project (1.2.3) into { tmpdir } : Removing existing virtual environment
183+ • Bundling simple-project (1.2.3) into { tmpdir } : Creating a virtual environment using Python { python_version }
184+ • Bundling simple-project (1.2.3) into { tmpdir } : Installing dependencies
185+ • Bundling simple-project (1.2.3) into { tmpdir } : Failed at step Installing dependencies
186186""" # noqa: E501
187187 assert expected == io .fetch_output ()
188188
0 commit comments