Skip to content

Update multiple unittests from CPython 3.10.5#3910

Merged
youknowone merged 26 commits into
RustPython:mainfrom
youknowone:update-container-tests
Jul 18, 2022
Merged

Update multiple unittests from CPython 3.10.5#3910
youknowone merged 26 commits into
RustPython:mainfrom
youknowone:update-container-tests

Conversation

@youknowone

Copy link
Copy Markdown
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 thread Lib/test/test_array.py Outdated
Comment on lines 1249 to 1250
def test_imul(self):
super().test_imul()

Copy link
Copy Markdown
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
Copy Markdown
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 thread Lib/test/test_deque.py
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
Copy Markdown
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 thread Lib/test/test_list.py
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
Copy Markdown
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 thread Lib/test/test_userlist.py
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
Copy Markdown
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
Copy Markdown
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 thread Lib/test/list_tests.py
Comment on lines +368 to 371
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_index(self):
super().test_index()

Copy link
Copy Markdown
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?

@youknowone youknowone Jul 18, 2022

Copy link
Copy Markdown
Member Author

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.

@fanninpm fanninpm left a comment

Copy link
Copy Markdown
Contributor

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 thread Lib/test/test_userlist.py
Comment on lines 11 to 12
def test_init(self):
super().test_init()

Copy link
Copy Markdown
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.

@youknowone youknowone Jul 18, 2022

Copy link
Copy Markdown
Member Author

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.

Comment thread Lib/test/test_userlist.py
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
Copy Markdown
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