Don't use metaclasses when class decorators can do the job.

Thanks to Nick Coghlan for pointing out that I'd forgotten about class
decorators.
This commit is contained in:
R David Murray 2012-05-31 18:00:45 -04:00
parent 8e0ed333b9
commit 1be413e366
6 changed files with 63 additions and 64 deletions

View file

@ -4,7 +4,7 @@ import unittest
from email import errors
from email import policy
from email.message import Message
from test.test_email import TestEmailBase, Parameterized
from test.test_email import TestEmailBase, parameterize
from email import headerregistry
from email.headerregistry import Address, Group
@ -175,7 +175,8 @@ class TestDateHeader(TestHeaderBase):
self.assertEqual(m['Date'].datetime, self.dt)
class TestAddressHeader(TestHeaderBase, metaclass=Parameterized):
@parameterize
class TestAddressHeader(TestHeaderBase):
example_params = {