-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
.only no longer runs all tests having the same name #300
Conversation
I wonder if it might be a better idea to just store a reference to the actual test function that's marked "only", rather than adding unique IDs? |
That would work too, but I would then undo it and redo it with numbers for the feature I've just written. I now have a command line argument |
I'm skeptical about the utility of that - that immediately makes test ordering tightly coupled to the user's expectations, and adding a test in the middle of the suite would renumber everything. The numbers appear for TAP output purposes, but I don't think it's a good idea to rely on them beyond referencing a specific test in a specific test run. |
Everything you say is true, but I don't understand the use case where these problems arise. My use case is that I've run the test suite and have one test I want to work on. My options are: (1) Insert |
It's also an option. Leave |
I was hoping to have this discussion under its own issue, so I created one #301. I only mentioned the feature here to explain my approach to the present problem. |
Let's definitely keep discussing in #301. As for this one, I think this is a good thing to fix - but I'd prefer not to implement the machinery for #301 until that's the direction decided upon. Would you be willing to rework this to store the function reference, using object identity to determine which test is the "only" one? |
I agree that if we're not going to be identifying tests by number, then the If we went ahead with a reference-based solution now and later decided to implement Given that I only found this problem in pursuit of the So I'm thinking that the resolution to this problem can wait on a decision for #301. I just don't see that we should be spending time doing something that we might undo. |
Besides, people are going to know it the moment that they put |
I'm curious why this pull request is still open if you've already merged the code. |
Oh, this was my original number-based proposal. Closing. |
This is a fix for #299, wherein all tests having the same name as the test marked
.only
are run.