Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rye test is not scoped to workspace members #853

Open
thoward27 opened this issue Mar 8, 2024 · 2 comments · May be fixed by #858
Open

Rye test is not scoped to workspace members #853

thoward27 opened this issue Mar 8, 2024 · 2 comments · May be fixed by #858

Comments

@thoward27
Copy link

Steps to Reproduce

  1. Create a new virtual rye project with one or more members.
  2. Define additional python packages outside of the members directory.
  3. Run rye test --all

At this point, rye is trying to run every test it can find, not just tests in my workspace members.

Example layout for a large monorepo

Structure:

project/
  crates/ # Rust crates published to Crates.IO
  pypi/ # Python wheels published to pypi
  tools/ # Random tools that I don't care about

Root toml:

[project]
name = "project"
version = "0.1.0"
description = "Add your description here"
authors = [
    { name = "Bob", email = "[email protected]" }
]
dependencies = []
readme = "README.md"
requires-python = ">= 3.9"

[tool.rye]
managed = true
virtual = true
dev-dependencies = [
    "pytest>=8.0.2",
]

[tool.rye.workspace]
members = ["pypi/*"]

Expected Result

I expect that rye will only run the tests for project members in pypi/.

Actual Result

Rye is running every test file in the entire repo, including the tools directory.

Version Info

rye 0.28.0
commit: 0.28.0 (c44dc7e 2024-03-07)
platform: macos (aarch64)
self-python: [email protected]
symlink support: true
uv enabled: false

Stacktrace

No response

@hyyking
Copy link
Contributor

hyyking commented Mar 9, 2024

image

Can reproduce, weirdly enough rye test --all and rye test don't have the same behaviour

Version:

rye 0.28.0
commit: 0.26.0+54 (73cd886 2024-03-05)
platform: windows (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true

@hyyking
Copy link
Contributor

hyyking commented Mar 9, 2024

After self update this is 100% reproducible.

image

Version:

rye 0.29.0
commit: 0.28.0+6 (9484b1a 2024-03-08)
platform: windows (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true

@hyyking hyyking linked a pull request Mar 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants