[PR #3521] [Other] tests: stop the wizard-discovery test from reading the checkout's own run configs #4667

Open
opened 2026-11-07 15:38:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3521
Author: @dsenchankau
Created: 10/20/2026
Status: 🔄 Open

Base: main ← Head: discovery-test-isolation


📝 Commits (4)

  • 6bdb67d tests: stop the wizard-discovery test from reading the checkout's own run configs
  • 791ed00 Merge branch 'main' into discovery-test-isolation
  • 294a33a Merge branch 'main' into discovery-test-isolation
  • e483847 Merge branch 'main' into discovery-test-isolation

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 tests/terminal/test_discovery.py (+9 -0)

📄 Description

Problem and result

tests.terminal.test_discovery.GuiLayout.test_list_and_the_wizard_agree_on_the_install fails on a checkout
that has been used for real work, one that holds its own strata-*.json run configs at the repository
root. Nothing is wrong with the code under test: the test fakes a Terminal install by pointing models.ROOT
at a temporary folder, but the Catalog finds its install folder from the location of the package files, not
from models.ROOT, so the real checkout, run configs and all, is discovered as a "here" install beside
the fake ones. The list and the wizard then disagree and the test fails, or passes, depending on files that
have nothing to do with it. Observed 2026-10-20 on upstream/main 9de04cd4 with four such run configs in
the checkout; the failure disappears with this change and the test passes with or without them.

Related discussion: none (test-only fix).

Approach

Two parts, both inside the test:

  • patch strata_cli.launch.catalog.installer_folder to the fake Terminal folder, the same lookup the test
    already redirects through models.ROOT;
  • copy the real setup.py and tools/strata_mcp.py into that fake folder first, because discovery reads
    the shipped model tables from them. The test then still exercises the real tables, only from a folder it
    controls.

Validation

  • Passed (2026-10-20, Linux, CPython 3.12.3, HEAD commit on top of 9de04cd4):
    python -m unittest tests.terminal.test_discovery: 21 tests, 2 failures (the two pre-existing ones
    below). The same command on the same checkout, same four run configs at the root, on plain
    9de04cd4: 3 failures, the two below plus
    test_list_and_the_wizard_agree_on_the_install.
  • Failed (pre-existing, fail identically on plain upstream/main, Linux, unrelated to this change):
    test_a_remembered_older_install_and_the_app_install_are_both_listed and
    test_an_own_setting_beats_the_apps_folder: they expect Windows app-data folders where Linux has XDG
    ones.
  • Not run: Windows and macOS.

Limits

Only the one test's isolation is fixed; the two Windows-path failures are left for whoever can run them on
Windows. test_setup_golden-style suite membership is unaffected.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3521 **Author:** [@dsenchankau](https://github.com/dsenchankau) **Created:** 10/20/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `discovery-test-isolation` --- ### 📝 Commits (4) - [`6bdb67d`](https://github.com/Niko1221/Strata/commit/6bdb67d0a60e77024afbc4ed24a97264c6f76c21) tests: stop the wizard-discovery test from reading the checkout's own run configs - [`791ed00`](https://github.com/Niko1221/Strata/commit/791ed009810f6fb2c374d3d00268aad9cf206c04) Merge branch 'main' into discovery-test-isolation - [`294a33a`](https://github.com/Niko1221/Strata/commit/294a33adcad4b562cf418faee52de7e662901fce) Merge branch 'main' into discovery-test-isolation - [`e483847`](https://github.com/Niko1221/Strata/commit/e4838471dd9aff30ba9018162fdfb67e2bd1b627) Merge branch 'main' into discovery-test-isolation ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/terminal/test_discovery.py` (+9 -0) </details> ### 📄 Description **Problem and result** `tests.terminal.test_discovery.GuiLayout.test_list_and_the_wizard_agree_on_the_install` fails on a checkout that has been used for real work, one that holds its own `strata-*.json` run configs at the repository root. Nothing is wrong with the code under test: the test fakes a Terminal install by pointing `models.ROOT` at a temporary folder, but the Catalog finds its install folder from the location of the package files, not from `models.ROOT`, so the real checkout, run configs and all, is discovered as a "here" install beside the fake ones. The list and the wizard then disagree and the test fails, or passes, depending on files that have nothing to do with it. Observed 2026-10-20 on `upstream/main` `9de04cd4` with four such run configs in the checkout; the failure disappears with this change and the test passes with or without them. **Related discussion:** none (test-only fix). **Approach** Two parts, both inside the test: - patch `strata_cli.launch.catalog.installer_folder` to the fake Terminal folder, the same lookup the test already redirects through `models.ROOT`; - copy the real `setup.py` and `tools/strata_mcp.py` into that fake folder first, because discovery reads the shipped model tables from them. The test then still exercises the real tables, only from a folder it controls. **Validation** - Passed (2026-10-20, Linux, CPython 3.12.3, HEAD commit on top of `9de04cd4`): `python -m unittest tests.terminal.test_discovery`: 21 tests, 2 failures (the two pre-existing ones below). The same command on the same checkout, same four run configs at the root, on plain `9de04cd4`: 3 failures, the two below plus `test_list_and_the_wizard_agree_on_the_install`. - Failed (pre-existing, fail identically on plain `upstream/main`, Linux, unrelated to this change): `test_a_remembered_older_install_and_the_app_install_are_both_listed` and `test_an_own_setting_beats_the_apps_folder`: they expect Windows app-data folders where Linux has XDG ones. - Not run: Windows and macOS. **Limits** Only the one test's isolation is fixed; the two Windows-path failures are left for whoever can run them on Windows. `test_setup_golden`-style suite membership is unaffected. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4667
No description provided.