MCPcopy
hub / github.com/pex-tool/pex / test_pex_builder_setuptools_script

Function test_pex_builder_setuptools_script

tests/test_pex_builder.py:230–244  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

228
229
230def test_pex_builder_setuptools_script(tmpdir):
231 # type: (Any) -> None
232
233 pex_file = os.path.join(str(tmpdir), "app.pex")
234 with make_bdist(
235 name="my_project",
236 ) as dist:
237 pb = PEXBuilder()
238 pb.add_dist_location(dist.location)
239 pb.set_script("shell_script")
240 pb.build(pex_file)
241
242 assert "hello world from shell script\n" == subprocess.check_output(args=[pex_file]).decode(
243 "utf-8"
244 )
245
246
247@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 7

add_dist_locationMethod · 0.95
set_scriptMethod · 0.95
buildMethod · 0.95
make_bdistFunction · 0.90
PEXBuilderClass · 0.90
decodeMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected