MCPcopy Create free account
hub / github.com/conda/constructor / test_payload_layout

Function test_payload_layout

tests/test_briefcase.py:205–222  ·  view source on GitHub ↗

Test the layout of the payload and verify that archiving parts of the payload works as expected.

()

Source from the content-addressed store, hash-verified

203
204@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")
205def test_payload_layout():
206 """Test the layout of the payload and verify that archiving
207 parts of the payload works as expected.
208 """
209 info = mock_info.copy()
210 payload = Payload(info)
211 payload.prepare()
212
213 external_dir = payload.root / "external"
214 assert external_dir.is_dir()
215
216 base_dir = payload.root / "external" / "base"
217 pkgs_dir = payload.root / "external" / "base" / "pkgs"
218 archive_path = external_dir / payload.archive_name
219 # Since archiving removes the directory 'base_dir' and its contents
220 assert not base_dir.exists()
221 assert not pkgs_dir.exists()
222 assert archive_path.exists()
223
224
225@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")

Callers

nothing calls this directly

Calls 2

prepareMethod · 0.95
PayloadClass · 0.90

Tested by

no test coverage detected