Skip to content

Commit 4dba96b

Browse files
committed
Rename TestMessage to ExampleMessage
When py.test is searching for tests it detects TestMessage as a potential class with test cases because it has 'Test' in its name. Because TestMessage contains a __init__ constructor py.test returns a warning that it can't collect tests from it. Lets rename the class to ExampleMessage to avoid this issue.
1 parent 1afdf97 commit 4dba96b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_multipart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from roundup.mailgw import Message
2222

23-
class TestMessage(Message):
23+
class ExampleMessage(Message):
2424
# A note on message/rfc822: The content of such an attachment is an
2525
# email with at least one header line. RFC2046 tells us: """ A
2626
# media type of "message/rfc822" indicates that the body contains an
@@ -160,7 +160,7 @@ def testMultipart(self):
160160
self.assert_(p is None)
161161

162162
def TestExtraction(self, spec, expected):
163-
self.assertEqual(TestMessage(spec).extract_content(), expected)
163+
self.assertEqual(ExampleMessage(spec).extract_content(), expected)
164164

165165
def testTextPlain(self):
166166
self.TestExtraction('text/plain', ('foo\n', []))

0 commit comments

Comments
 (0)