/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2007-03-07 19:41:22 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070307194122-pg1tkm7p94xsyi3y
Prevent test suite from causing default-encoding changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
435
435
def test_suite():
436
436
    from unittest import TestSuite
437
437
    import tests
438
 
    result = TestSuite()
439
 
    result.addTest(tests.test_suite())
 
438
    import sys
 
439
    default_encoding = sys.getdefaultencoding()
 
440
    try:
 
441
        result = TestSuite()
 
442
        result.addTest(tests.test_suite())
 
443
    finally:
 
444
        reload(sys)
 
445
        sys.setdefaultencoding(default_encoding)
440
446
    return result