tests: make integration tests use datadir
Metadata
Current evaluation
Closed unmerged after review; the pytest-datadir integration-test refactor was deferred to canonical/craft-parts#275 for broader design discussion.
Resolution: closed superseded
Reason: The author closed #272 unmerged on 2022-09-02, stating that review feedback led to opening #275 for proper discussion of separating test data and code.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The `pytest-datadir` plugin enable per-test-module data, that is exposed
to tests via the `datadir` fixture. This proof-of-concept commit
refactors the existing integration tests for the rust plugin to use this
scheme.
The main change is that `test_rust.py` is simplified because all the
runtime rust code generation is moved to data diles in the `test_rust/`
dir; this is useful because these rust files are static, and their
generation is not what's being tested.
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged after review; the pytest-datadir integration-test refactor was deferred to canonical/craft-parts#275 for broader design discussion. | |
| stealth/space-bunny-alpha | — | closed superseded | PR #272 was closed unmerged; its pytest-datadir proof of concept was deferred to issue #275 for discussion on separating integration-test data and code. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed the pytest-datadir proof of concept without merging; the author moved discussion of splitting integration-test data and code to canonical/craft-parts#275. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned without merging. The author closed the request to open issue #275 for broader discussion on refactoring integration tests to use pytest-datadir for static rust files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without merging. The author abandoned the pytest-datadir refactoring for integration tests and opened issue #275 to discuss the approach further. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/craft-parts#275
(confidence 99%)
The closing comment explicitly says #272 was closed and #275 opened to discuss this topic.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #275 Refactor integration tests to split data and code | craft-parts | open | Maintainer proposal to split integration-test fixture data from test code via a datadir-style fixture. PR #272 was closed unmerged; grep shows no datadir fixture exists and inline write_text setup remains (e.g. executor/test_errors.py). Design decision still open. | |
| #276 tests: make integration tests work with pytest-xdist | craft-providers | closed | Parallel pytest-xdist integration testing was ultimately merged in PR #320 as commit 35b06f4, replacing the closed #276 proposal. |