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

Adds a pdb flag under the unittest task #55

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nkallergis
Copy link

@nkallergis nkallergis commented Oct 30, 2024

Closes #194.

@nkallergis nkallergis requested a review from a team as a code owner October 30, 2024 17:05
@nkallergis nkallergis requested review from a team and removed request for a team October 30, 2024 17:07
tasks.py Show resolved Hide resolved
@@ -827,6 +828,8 @@ def unittest( # noqa: PLR0913
command += " --failfast"
if buffer:
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps?

Suggested change
if buffer:
if buffer and not pdb:

Copy link
Author

Choose a reason for hiding this comment

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

I toyed with this idea but I feel it's a bit counterintuitive and against the "explicit better than implicit" principle. Just a personal opinion though, I'm OK to implement it this way if you feel strong about it...

Copy link
Contributor

Choose a reason for hiding this comment

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

Whenever I put a breakpoint in a test and forget to use --no-buffer it doesn't output anything and just freezes until I do a docker stop on the container. Does the same thing happen with --pdb?

Copy link
Author

Choose a reason for hiding this comment

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

Indeed, you have to add --no-buffer too to get to the interesting part. I take it you prefer to auto-add it as it makes more sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the behavior when you forget --no-buffer is that it silently fails then I would prefer to add it automatically

changes/194.added Outdated Show resolved Hide resolved
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.

Add a pdb flag under the unittest task
2 participants