Skip to content

Make names of test classes start with Test - #4320

Merged
takagi merged 1 commit into
cupy:masterfrom
toslunar:rename-test-class
Dec 1, 2020
Merged

takagi merged 1 commit into
cupy:masterfrom
toslunar:rename-test-class

Conversation

@toslunar

Copy link
Copy Markdown
Member

This coding rule will be required in order to stop inheriting unittest.TestCase. https://docs.pytest.org/en/stable/reference.html#confval-python_classes

@toslunar toslunar added the cat:code-fix Code refactoring that do not change behavior label Nov 24, 2020
@kmaehashi kmaehashi added to-be-backported Pull-requests to be backported to stable branch prio:medium labels Nov 25, 2020
@toslunar

Copy link
Copy Markdown
Member Author

To confirm,

tests/conftest.py

def pytest_collection_finish(session):
    for item in session.items:
        if type(item).__name__ == 'TestCaseFunction':
            unittestcase = item.listchain()[-2]
            if not unittestcase.name.startswith('Test'):
                print(f'bad name: {item.nodeid}')

@takagi

takagi commented Nov 30, 2020

Copy link
Copy Markdown
Contributor

pfnCI, test this please.

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit 084384a, target branch master) succeeded!

@takagi takagi added this to the v9.0.0b1 milestone Dec 1, 2020
@takagi

takagi commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

LGTM!

@takagi
takagi merged commit 436b09b into cupy:master Dec 1, 2020
@toslunar
toslunar deleted the rename-test-class branch December 1, 2020 05:12
@toslunar toslunar mentioned this pull request Dec 1, 2020
@toslunar toslunar modified the milestones: v9.0.0b1, v9.0.0a3 Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:code-fix Code refactoring that do not change behavior prio:medium to-be-backported Pull-requests to be backported to stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants