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

Differentiate parsing errors in a parent class from the ones in the test class #6684

Open
wants to merge 1 commit into
base: 5.0
Choose a base branch
from

Conversation

martin-rueegg
Copy link

Currently, when a test inherits from a parent class, and there is a parsing error happening while parsing this parent class, then the error shows the parse error and line number from the parent class, but the file name from the (child) test class.

This patch will show the file name in which the error actually happens. And if it's not in the test class it self, it will additionally indicate to the name of the test class.

@martin-rueegg
Copy link
Author

New tests have been added, but I was unable to run them with reasonable effort.

If they fail, please help me adjusting them as I've already spent way to much time on this little fix ... :-)

Thank you!

@martin-rueegg
Copy link
Author

@Naktibalda fixed some more errors based on the test result. Would you mind re-queuing the current version for an automatic test, please?

@martin-rueegg martin-rueegg force-pushed the fix/parse-exception branch 2 times, most recently from 0a22530 to 9e54a33 Compare August 16, 2023 23:13
@martin-rueegg
Copy link
Author

Thank you, @Naktibalda

Apparently, codecept_data_dir() does not return a normalized file path, but includes test/data rather than test\data also on Windows. So I'm now normalizing the file paths before comparison.

@martin-rueegg martin-rueegg force-pushed the fix/parse-exception branch 3 times, most recently from d33674b to bffedd5 Compare August 20, 2023 14:16
@martin-rueegg
Copy link
Author

@Naktibalda I'm so sorry, I thought I had tested if null input works ...

@martin-rueegg
Copy link
Author

@Naktibalda Thanks, I guess we're getting there eventually ... :-)

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.

None yet

2 participants