Skip to content

test: add test for CLI output dependant on reportlab existence #1641

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

Merged
merged 2 commits into from
May 24, 2022

Conversation

onyxcherry
Copy link
Contributor

No description provided.

@onyxcherry onyxcherry changed the title test: add test for CLI output dependant on reportlab existence test: add test for CLI output dependant on reportlab existence * fixes: #1627 Apr 18, 2022
@onyxcherry
Copy link
Contributor Author

I wonder if the test isn't implementation-specific.
Although the presented solution in the test is a minimal working example to fulfill the importlib.util.find_spec function requirements, in the future may be an additional condition that should have been met (e.g one more dunder property set).

Rather it should not, but it is a matter for consideration.

@onyxcherry onyxcherry changed the title test: add test for CLI output dependant on reportlab existence * fixes: #1627 test: add test for CLI output dependant on reportlab existence Apr 25, 2022
@onyxcherry
Copy link
Contributor Author

So which title has trailing whitespace?

test/test_cli.py Outdated
from importlib.machinery import ModuleSpec
from importlib.util import module_from_spec

my_test_filename = "reportlab_test_report.pdf"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make sure this test runs in the temp directories like we've done with other tests? Sure, it's unlikely this filename will already be in use, but I'd rather just do it the right way. You should be able to use the same construction you're using for the curl test file below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry about the multi-posted comments here a second ago: apparently if you delete pending comments they don't really delete correctly)

@terriko
Copy link
Contributor

terriko commented Apr 27, 2022

Oh, and the trailing whitespace thing should have been on the title of the pull request. It's... a bit weird how it handles it when the PR title is updated but the code is not. But the request title looks correct to me now so next time you do a code update that linter should pass.

Create an output file in the temporary directory, change spoofed module's name
@onyxcherry onyxcherry requested a review from terriko April 27, 2022 16:04
@onyxcherry
Copy link
Contributor Author

What's wrong with my code?
What is a reason why the Conda cannot install packages?

CondaError: KeyboardInterrupt

Error: The operation was canceled.

@terriko
Copy link
Contributor

terriko commented May 3, 2022

Re-running failed jobs. I think Conda was just having weird delays (this has happened before) so I'm just going to let that test try to run again.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is good to merge. Thank you for the code and for your patience in getting it merged!

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 this pull request may close these issues.

2 participants