Skip MetaDrive tests when assets cannot be downloaded #424
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
MetaDrive needs to download an
assetsfolder from a remote URL the first time it runs. On a local machine this usually happens once per virtual environment and is then cached. In CI, each run starts from a clean environment, so MetaDrive has to download the assets every time, and if that download fails, all of our MetaDrive tests fail.This PR updates
test_metadrive.pyso that we explicitly callmetadrive.pull_asset(update=False)before running any tests. If the asset download fails, we skip the entire MetaDrive test file instead of failing CI.This keeps the MetaDrive tests from failing due to temporary download issues while still running them whenever the assets can be fetched successfully.
Issue Link
Checklist
pytestand/or other meansAdditional Notes