~ubuntu-branches/ubuntu/trusty/enigmail/trusty

« back to all changes in this revision

Viewing changes to python/simplejson-2.1.1/simplejson/tests/__init__.py

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-mpeaob8bhtk42aun
Tags: 2:1.5.2-0ubuntu1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import unittest
2
 
import doctest
3
 
 
4
 
 
5
 
class OptionalExtensionTestSuite(unittest.TestSuite):
6
 
    def run(self, result):
7
 
        import simplejson
8
 
        run = unittest.TestSuite.run
9
 
        run(self, result)
10
 
        simplejson._toggle_speedups(False)
11
 
        run(self, result)
12
 
        simplejson._toggle_speedups(True)
13
 
        return result
14
 
 
15
 
 
16
 
def additional_tests(suite=None):
17
 
    import simplejson
18
 
    import simplejson.encoder
19
 
    import simplejson.decoder
20
 
    if suite is None:
21
 
        suite = unittest.TestSuite()
22
 
    for mod in (simplejson, simplejson.encoder, simplejson.decoder):
23
 
        suite.addTest(doctest.DocTestSuite(mod))
24
 
    suite.addTest(doctest.DocFileSuite('../../index.rst'))
25
 
    return suite
26
 
 
27
 
 
28
 
def all_tests_suite():
29
 
    suite = unittest.TestLoader().loadTestsFromNames([
30
 
        'simplejson.tests.test_check_circular',
31
 
        'simplejson.tests.test_decode',
32
 
        'simplejson.tests.test_default',
33
 
        'simplejson.tests.test_dump',
34
 
        'simplejson.tests.test_encode_basestring_ascii',
35
 
        'simplejson.tests.test_encode_for_html',
36
 
        'simplejson.tests.test_fail',
37
 
        'simplejson.tests.test_float',
38
 
        'simplejson.tests.test_indent',
39
 
        'simplejson.tests.test_pass1',
40
 
        'simplejson.tests.test_pass2',
41
 
        'simplejson.tests.test_pass3',
42
 
        'simplejson.tests.test_recursion',
43
 
        'simplejson.tests.test_scanstring',
44
 
        'simplejson.tests.test_separators',
45
 
        'simplejson.tests.test_speedups',
46
 
        'simplejson.tests.test_unicode',
47
 
        'simplejson.tests.test_decimal',
48
 
    ])
49
 
    suite = additional_tests(suite)
50
 
    return OptionalExtensionTestSuite([suite])
51
 
 
52
 
 
53
 
def main():
54
 
    runner = unittest.TextTestRunner()
55
 
    suite = all_tests_suite()
56
 
    runner.run(suite)
57
 
 
58
 
 
59
 
if __name__ == '__main__':
60
 
    import os
61
 
    import sys
62
 
    sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
63
 
    main()