mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
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:
parent
8e0ed333b9
commit
1be413e366
6 changed files with 63 additions and 64 deletions
|
|
@ -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 = {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue