Opened 7 years ago

Closed 7 years ago

#7872 enhancement closed fixed (fixed)

Tests for twisted.test should conform to the new style of naming test classes

Reported by: Eeshan Garg Owned by: Eeshan Garg
Priority: normal Milestone:
Component: core Keywords: easy
Cc: Eeshan Garg Branch: branches/twisted-test-names-7872
branch-diff, diff-cov, branch-cov, buildbot
Author: adiroiban

Description

This ticket is a follow-up to ticket 7032.

Attachments (1)

misc_7872.patch (100.6 KB) - added by Eeshan Garg 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Eeshan Garg

Attachment: misc_7872.patch added

comment:1 Changed 7 years ago by Eeshan Garg

Keywords: review added

Hello!

I am adding a patch for this (misc_7872.patch). This is one big diff because there were a lot of test classes in twisted.test that needed to be renamed.

There were also cases where there were test classes like MessageParsingTestCase (which I renamed to MessageParsingTests) and MessageParsing2TestCase (for test classes named like this, I tried to give them more descriptive names based on what was being tested).

Also there were test classes in the same file that went like TestFTPClient and FTPClientTestCase, now if you rename these two according to the FooTests naming convention recommended in our coding standard, you will end up with two classes named FTPClientTests in the same file, resulting in either one of them getting skipped and the tests for the skipped test class not being run at all. Here, again I tried to rename such classes and give them more descriptive names based on what or how a component was being tested. Here are the tests that I had to rename and how I renamed them:

And that's pretty much it, I guess. Let me know what you think! :-)

Regards, Eeshan Garg

comment:2 Changed 7 years ago by Adi Roiban

Author: adiroiban
Branch: branches/twisted-test-names-7872

(In [44571]) Branching to twisted-test-names-7872.

comment:3 Changed 7 years ago by Adi Roiban

Keywords: review removed
Owner: set to Eeshan Garg

Hi,

Many thanks for this patch!

Changes looks good.

There is one minor problem which cause a py3 test to fail

twisted/test/test_internet.py:1038: undefined name 'Resolve'

I have fixed it and sent the changes for retesting.

Will merge if tests pass.

Thanks!

comment:4 Changed 7 years ago by Adi Roiban

Resolution: fixed
Status: newclosed

(In [44574]) Merge twisted-test-names-7872: Update test in twisted.test to conform to the new style of naming test classes.

Author: eeshangarg Reviewers: adiroiban Fixes: #7872

Note: See TracTickets for help on using tickets.