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

QUTest Failure Traceback Line Numbers #10

Closed
wants to merge 4 commits into from

Conversation

harrisonmg
Copy link

This PR modifies the functionality of qutest.py to print the line number of the user script where a QUTest has failed.

Now, multiple line numbers will be printed - separated by colons - for each function call in the user script. This forms a traceback of line numbers starting at the highest function call in the user script, and ending at the user's call to a DSL function.

In an attempt to increase the robustness of this solution, the _traceback_lines() function also ensures that the call stack will not be indexed out of bounds.

@quantum-leaps
Copy link
Contributor

Hi Harrison,
Thanks again for the contribution, but it seems to be giving diminishing returns. The line # of the first failure is quite valuable, but the value of quickly diminishes as you move up the call stack. Most test don't have deeply nested calls.

So, I feel that the marginal returns are not worth the trouble, and I'd skip this improvement.

Please don't get discouraged by this. It is simply my job to keep things as simple as possible.

--MMS

@harrisonmg
Copy link
Author

Hi Miro,

I understand you reasons for keeping everything simple. I furthered this feature for personal use in my own large tests with nested calls, sometimes spanning multiple files.

Hopefully this PR, regardless of merge status, can still help others with use cases similar to mine.

Best,
Harrison

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