Skip to content

Update multiple unittests from CPython 3.10.5 #3910

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 26 commits into from
Jul 18, 2022

Conversation

youknowone
Copy link
Member

No description provided.

@fanninpm fanninpm self-requested a review July 17, 2022 18:14
@youknowone youknowone force-pushed the update-container-tests branch from b8fa3e2 to ebc7b57 Compare July 17, 2022 18:34
Comment on lines 1249 to 1250
def test_imul(self):
super().test_imul()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the ones around here that no longer have the @unittest.expectedFailure decorators on them be removed? @frank-king left these behind without realizing why I put them there.

Copy link
Member Author

Choose a reason for hiding this comment

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

@fanninpm you don't need to mention someone unless we actually need their attention. In this case, I think referring commit or pr url can be helpful, but not about the author.

Comment on lines 932 to 945
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_contains_fake(self):
super().test_contains_fake()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_count(self):
super().test_count()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_index(self):
super().test_index()
Copy link
Contributor

Choose a reason for hiding this comment

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

When I add things like this, I'd like to direct contributors against leaving the last two lines of this pattern behind when they un-mark these tests.

Comment on lines 234 to 242
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_count(self):
super().test_count()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_contains_fake(self):
super().test_contains_fake()
Copy link
Contributor

Choose a reason for hiding this comment

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

When I add things like this, I'd like to direct contributors against leaving the last two lines of this pattern behind when they un-mark these tests.

Comment on lines 14 to 22
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_contains_fake(self):
super().test_contains_fake()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_count(self):
super().test_count()
Copy link
Contributor

Choose a reason for hiding this comment

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

When I add things like this, I'd like to direct contributors against leaving the last two lines of this pattern behind when they un-mark these tests.

@youknowone youknowone force-pushed the update-container-tests branch from ebc7b57 to a5dac57 Compare July 17, 2022 19:03
@youknowone youknowone force-pushed the update-container-tests branch from a5dac57 to 6842f9b Compare July 17, 2022 19:08
@youknowone youknowone changed the title Update multiple container-related unittests from CPython 3.10.5 Update multiple unittests from CPython 3.10.5 Jul 17, 2022
@youknowone
Copy link
Member Author

@fanninpm I added additional comments for new methods from rustpython and added 4 more commits

@youknowone youknowone force-pushed the update-container-tests branch from 6842f9b to 6729417 Compare July 17, 2022 19:38
Comment on lines +368 to 371
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_index(self):
super().test_index()
Copy link
Contributor

Choose a reason for hiding this comment

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

In the future, classes dependent on this test may start unexpectedly passing. Will they unexpectedly pass all at once or one at a time?

Copy link
Member Author

@youknowone youknowone Jul 18, 2022

Choose a reason for hiding this comment

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

Tests are supportive code. They will be handled when they actually be solved. We can spend cost when we actually need it.

The answer is I don't know. Sometimes they passes at once, sometimes not. It depends on problems and solutions. I didn't look in the details.

Copy link
Contributor

@fanninpm fanninpm left a comment

Choose a reason for hiding this comment

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

Just a few minor cleanup notes.

Comment on lines 11 to 12
def test_init(self):
super().test_init()
Copy link
Contributor

Choose a reason for hiding this comment

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

The test_init method in list_tests.CommonTest is no longer marked. I don't think this needs to be here.

Copy link
Member Author

@youknowone youknowone Jul 18, 2022

Choose a reason for hiding this comment

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

@fanninpm we expect code review is about changed code, instead of arbitrary code around changed code.

I think that change is independent from this PR. If you want me to fix it, I will do it in separated PR.

@unittest.expectedFailure
def test_count(self): # XXX: RUSTPYTHON; the method also need to be removed when done
super().test_count()

# TODO: RUSTPYTHON, parent method is marked but this version passes
Copy link
Contributor

Choose a reason for hiding this comment

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

The test_repr_deep method in list_tests.CommonTest is no longer marked, so this comment is currently outdated.

@youknowone youknowone merged commit 79f4b33 into RustPython:main Jul 18, 2022
@youknowone youknowone deleted the update-container-tests branch July 18, 2022 13:19
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