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

Command-line interface bug with patterns #357

Closed
drmfinlay opened this issue Sep 13, 2021 · 1 comment
Closed

Command-line interface bug with patterns #357

drmfinlay opened this issue Sep 13, 2021 · 1 comment
Assignees
Labels
Error Unexpected replicated behavior

Comments

@drmfinlay
Copy link
Member

The command-line interface load and test commands are both documented to take zero or more command module file paths. However, this rule is broken if a glob pattern is specified that matches no files, in which case the program exits early with an error. The following commands should both have the same behaviour run in an empty directory:

python -m dragonfly test
python -m dragonfly test _*.py
@drmfinlay drmfinlay added the Error Unexpected replicated behavior label Sep 13, 2021
@drmfinlay drmfinlay self-assigned this Sep 13, 2021
@drmfinlay
Copy link
Member Author

There is a bug here, but the above is not quite right. I think the correct solution is to treat the string as a normal filename if the pattern matches no files.

drmfinlay added a commit that referenced this issue Sep 23, 2021
Fixes #357.

This fixes a bug where non-matching glob patterns are not treated
as normal filenames.  For example, if the pattern "_*.py" matches no
files in the working directory, then the *load* and *test* commands
will attempt to use the pattern string as a filename and give the
usual error message if that fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Unexpected replicated behavior
Projects
None yet
Development

No branches or pull requests

1 participant