Mailing List Archive

Question about code in test_email/test_message.py
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 -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/ZZPUTGXEWDNQLGRIXFBLVP5QBXEVQ3SK/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Question about code in test_email/test_message.py [ In reply to ]
> 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 -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PJOT32I5SMOHEGMTIOI5RNM6ZT2IDBR7/
Code of Conduct: http://python.org/psf/codeofconduct/