From e90d580400e1729689c9fae6e9d6e2c848195a96 Mon Sep 17 00:00:00 2001 From: John Kristensen Date: Fri, 21 Aug 2015 17:37:22 +1000 Subject: [PATCH 3/5] 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. --- test/test_multipart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_multipart.py b/test/test_multipart.py index 09a5a444b8..704e9f15ac 100644 --- a/test/test_multipart.py +++ b/test/test_multipart.py @@ -20,7 +20,7 @@ from cStringIO import StringIO from roundup.mailgw import Message -class TestMessage(Message): +class ExampleMessage(Message): # A note on message/rfc822: The content of such an attachment is an # email with at least one header line. RFC2046 tells us: """ A # media type of "message/rfc822" indicates that the body contains an @@ -160,7 +160,7 @@ class MultipartTestCase(unittest.TestCase): self.assert_(p is None) def TestExtraction(self, spec, expected): - self.assertEqual(TestMessage(spec).extract_content(), expected) + self.assertEqual(ExampleMessage(spec).extract_content(), expected) def testTextPlain(self): self.TestExtraction('text/plain', ('foo\n', [])) -- 2.5.0