Mercurial > p > roundup > code
view test/test_anypy.py @ 7621:470e29fb36db
build: disable documention on xapian for travis-ci.
--disable-documentation passed to configure doesn't work and I have a
crash in sphinx that prevents testing.
Use -enable-documentation=no which appears to be how 1.4.14 expects it
at least.
no-github-ci to disable testing for github as this change affects
travis only at this point. If it works, I'll disable doc build on
github to to save cycles.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 11 Sep 2023 00:42:01 -0400 |
| parents | e4db9d0b85c7 |
| children | c65e0a725c88 |
line wrap: on
line source
"""Random tests for anypy modules""" import unittest from roundup.anypy.strings import repr_export, eval_import import sys _py3 = sys.version_info[0] > 2 class StringsTest(unittest.TestCase): def test_import_params(self): """ issue2551170 - handle long int in history/journal params tuple """ # python2 export with id as number val = eval_import("('issue', 2345L, 'status')") self.assertSequenceEqual(val, ('issue', 2345, 'status')) # python3 export with id as number val = eval_import("('issue', 2345, 'status')") self.assertSequenceEqual(val, ('issue', 2345, 'status')) # python2 or python3 export with id as string val = eval_import("('issue', '2345', 'status')") self.assertSequenceEqual(val, ('issue', '2345', 'status')) def test_export_params(self): """ issue2551170 - handle long int in history/journal params tuple """ # python2 export with id as number if _py3: val = repr_export(('issue', 2345, 'status')) self.assertEqual(val, "('issue', 2345, 'status')") else: val = repr_export(('issue', long(2345), 'status')) self.assertEqual(val, "('issue', 2345L, 'status')") # python2 or python3 export with id as string val = repr_export(('issue', '2345', 'status')) self.assertEqual(val, "('issue', '2345', 'status')")
