Test the layout of the payload and verify that archiving parts of the payload works as expected.
()
| 203 | |
| 204 | @pytest.mark.skipif(sys.platform != "win32", reason="Windows only") |
| 205 | def 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") |