[Python-Dev] Question about code in test_email/test_message.py

2022-07-06 Thread Sidney Markowitz
I'm writing up a PR for an issue I created and adding a test to 
test/test_email/test_message.py

In that file there is a variable named message_params that is initialized with 
about 15 different sets of test data, in class TestEmailMessageBase, but is 
never referenced again. I even grepped for the variable name in all test py 
files to confirm that it isn't somehow imported somewhere.

Is there something about the test framework that uses that automatically? I'm 
hesitant to add any testing code for my issue if I'm missing something so 
fundamental.

Thanks.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/ZZPUTGXEWDNQLGRIXFBLVP5QBXEVQ3SK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Question about code in test_email/test_message.py

2022-07-06 Thread Stefan Ring
> In that file there is a variable named message_params that is initialized 
> with about 15 different sets of test data, in class TestEmailMessageBase, but 
> is never referenced again. I even grepped for the variable name in all test 
> py files to confirm that it isn't somehow imported somewhere.
>
> Is there something about the test framework that uses that automatically? I'm 
> hesitant to add any testing code for my issue if I'm missing something so 
> fundamental.

Have a look at the "parameterize" decorator (in __init__.py in the
same directory). It looks for things that .endswith('_params').
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/PJOT32I5SMOHEGMTIOI5RNM6ZT2IDBR7/
Code of Conduct: http://python.org/psf/codeofconduct/