/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-11-22 15:32:54 UTC
  • mto: This revision was merged to the branch mainline in revision 405.
  • Revision ID: abentley@panoramicfeedback.com-20071122153254-i21r1hbmzovcv2t1
Allow test suite to run without pygtk

Show diffs side-by-side

added added

removed removed

Lines of Context:
700
700
    from unittest import TestSuite
701
701
    import tests
702
702
    import sys
703
 
    import pygtk
704
 
    pygtk.require('2.0')
705
703
    default_encoding = sys.getdefaultencoding()
706
704
    try:
707
705
        result = TestSuite()
 
706
        try:
 
707
            import_pygtk()
 
708
        except errors.BzrCommandError:
 
709
            return result
708
710
        result.addTest(tests.test_suite())
709
711
    finally:
710
712
        if sys.getdefaultencoding() != default_encoding: