Mercurial > p > roundup > code
diff test/db_test_base.py @ 5036:380d8d8b30a3
Replace existing run_tests.py script with a pytest script
The existing run_test.py script is quite old, a bit restrictive, and
doesn't always behave as documented. The pytest testing tool is mature,
well documented, and maintained.
The run_tests.py script is generating by installing py.test and running:
py.tests --genscript=run_tests.py
Note: to generate a script that is compatible with python2.6 the command
needs to be run using python2.6
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Thu, 20 Aug 2015 18:15:23 +1000 |
| parents | 63c79c0992ae |
| children | 5251e97b1de0 |
line wrap: on
line diff
--- a/test/db_test_base.py Fri Aug 21 17:37:22 2015 +1000 +++ b/test/db_test_base.py Thu Aug 20 18:15:23 2015 +1000 @@ -20,6 +20,7 @@ import gpgmelib from email.parser import FeedParser +import pytest from roundup.hyperdb import String, Password, Link, Multilink, Date, \ Interval, DatabaseError, Boolean, Number, Node from roundup.mailer import Mailer @@ -2019,14 +2020,12 @@ roundupdb._ = old_translate_ Mailer.smtp_send = backup + @pytest.mark.skipif(gpgmelib.pyme is None, reason='Skipping PGPNosy test') def testPGPNosyMail(self) : """Creates one issue with two attachments, one smaller and one larger than the set max_attachment_size. Recipients are one with and one without encryption enabled via a gpg group. """ - if gpgmelib.pyme is None: - print "Skipping PGPNosy test" - return old_translate_ = roundupdb._ roundupdb._ = i18n.get_translation(language='C').gettext db = self.db
