Mercurial > p > roundup > code
diff test/test_templating.py @ 7923:29a666d8a70d
issue2551285 - Remove StructuredText support
Asked on the users mailing list if anybody was using it. Got no responses.
I have never seen CI installing structuredtext packages so it's
untested as well.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 30 Apr 2024 22:27:57 -0400 |
| parents | 9bbc1d951677 |
| children | a9b136565838 |
line wrap: on
line diff
--- a/test/test_templating.py Tue Apr 30 22:17:50 2024 -0400 +++ b/test/test_templating.py Tue Apr 30 22:27:57 2024 -0400 @@ -23,12 +23,6 @@ skip_rst = mark_class(pytest.mark.skip( reason='ReStructuredText not available')) -if StructuredText: - skip_stext = lambda func, *args, **kwargs: func -else: - skip_stext = mark_class(pytest.mark.skip( - reason='StructuredText not available')) - import roundup.cgi.templating if roundup.cgi.templating._import_mistune(): skip_mistune = lambda func, *args, **kwargs: func @@ -570,11 +564,6 @@ self.assertEqual(t.rst(), u2s(t_result)) self.assertEqual(u.rst(), u2s(u_result)) - @skip_stext - def test_string_stext(self): - p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'A string with cmeerw@example.com *embedded* \u00df')) - self.assertEqual(p.stext(), u2s(u'<p>A string with <a href="mailto:cmeerw@example.com">cmeerw@example.com</a> <em>embedded</em> \u00df</p>\n')) - def test_string_field(self): p = StringHTMLProperty(self.client, 'test', '1', None, 'test', 'A string <b> with rouilj@example.com embedded < html</b>') self.assertEqual(p.field(), '<input name="test1@test" size="30" type="text" value="A string <b> with rouilj@example.com embedded &lt; html</b>">') @@ -1103,23 +1092,6 @@ p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'A string with cmeerw@example.com *embedded* \u00df')) self.assertEqual(p.rst(), u2s(u'A string with <a href="mailto:cmeerw@example.com">cmeerw@example.com</a> *embedded* \u00df')) -class NoStextTestCase(TemplatingTestCase) : - def setUp(self): - TemplatingTestCase.setUp(self) - - from roundup.cgi import templating - self.__StructuredText = templating.StructuredText - templating.StructuredText = None - - def tearDown(self): - from roundup.cgi import templating - templating.StructuredText = self.__StructuredText - - def test_string_stext(self): - p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'A string with cmeerw@example.com *embedded* \u00df')) - self.assertEqual(p.stext(), u2s(u'A string with <a href="mailto:cmeerw@example.com">cmeerw@example.com</a> *embedded* \u00df')) - - class ZUtilsTestcase(TemplatingTestCase): def test_Iterator(self):
