Skip to content

Test Annotation Framework for Imported CPython test #1973

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

TheAnyKey
Copy link
Contributor

@TheAnyKey TheAnyKey commented Jun 22, 2020

When importing test currentlyfrom CPython, they need to be annotated with comments like

# TODO RustPython
or
# TODO: RustPython

or how ever the author likes. Further the original file revision and the orignating python (language) revision is missing in most of the imported tests, what makes tracking nearly impossible.
To improve the convention base "solution", I propose a python annotation framework using decorators to properly annotate the imported test cases, such that they can be tracked and evaluated in a comprehnesive and comfortable way.
Examples can be seen in Lib/test/test_rpt.py.

This the initial implementation. The core functionality is there and tested, but, e.g., the reporting is very rudimentary and more for demonstration purpoposes.

Copy link
Member

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

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

I really like this idea! It would at least allow us to mark which tests should actually need work on our side in the test results webpage. @palaviv @youknowone what do you think?

@palaviv
Copy link
Contributor

palaviv commented Jun 26, 2020

I love this idea!

Copy link
Contributor

@jamestwebber jamestwebber left a comment

Choose a reason for hiding this comment

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

Wanted to read this to see the new scheme and found some typos

TheAnyKey and others added 2 commits June 30, 2020 17:38
…and comments

Co-authored-by: James Webber <jamestwebber@users.noreply.github.com>
Co-authored-by: Jeong YunWon <youknowone@users.noreply.github.com>
@youknowone
Copy link
Member

I agree marking things more than comments is a good idea.

Copy link
Contributor

@palaviv palaviv left a comment

Choose a reason for hiding this comment

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

Can we push this in @coolreader18, @youknowone?

@coolreader18
Copy link
Member

Yeah, lgtm. There might be more skips/expectedFailures to replace with this since this pr was opened, but we can do that as a follow-up

@youknowone
Copy link
Member

youknowone commented Jul 18, 2020

I strongly prefer this idea to current state.

Not sure librptest has to be placed in Lib/test. I basically regard keeping this directory same to CPython as possible as make easier to manage it in future. (Though it is ok if this is technical constraint)

I don't agree rpt.originated_from usage for class. We probably will not compose a test file with multiple class from different CPython versions. It is better to be placed for the file rather than the class.

@coolreader18
Copy link
Member

👍 for the last paragraph @youknowone

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.

5 participants