/Lib/test/test_json.py

http://unladen-swallow.googlecode.com/ · Python · 21 lines · 7 code · 0 blank · 14 comment · 0 complexity · 2442381b7cda4507e02bfe8526c4ec10 MD5 · raw file

  1. """Tests for json.
  2. The tests for json are defined in the json.tests package;
  3. the test_suite() function there returns a test suite that's ready to
  4. be run.
  5. """
  6. import json.tests
  7. import sys
  8. import test.test_support
  9. def test_main():
  10. test.test_support.run_unittest(json.tests.test_suite())
  11. if __name__ == "__main__":
  12. if sys.flags.optimize >= 2:
  13. print >>sys.stderr, "test_json -- skipping some tests due to -O flag."
  14. sys.stderr.flush()
  15. test_main()