~barcc/ubuntu/saucy/pyicu/lp1200419

« back to all changes in this revision

Viewing changes to test/__init__.py

  • Committer: Package Import Robot
  • Author(s): Jakub Wilk, Bernd Zeimetz, Jakub Wilk
  • Date: 2011-11-13 12:07:46 UTC
  • mfrom: (3.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111113120746-20jj2w42dzz6xozt
Tags: 1.3-1
* Team upload.

[ Bernd Zeimetz ]
* Migrate to dh_python2 (closes: #635633).

[ Jakub Wilk ]
* New upstream version.
  + Fix compatiblity with ICU 4.8 (closes: #628584).
  + Rewrite platform-definitions-fix.dpatch from scratch.
  + Revert upstream change to make ICUtzinfo a heap type.
* Bump standards version to 3.9.2 (no changes needed).
* Don't override shared library dependency information for libpython2.X; the
  exension modules aren't linked to it anyway.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# test package
 
2
 
 
3
import sys
 
4
 
 
5
if __name__ == "__main__":
 
6
    if sys.version_info >= (2, 7):
 
7
        import os, unittest
 
8
 
 
9
        def load_tests(loader, standard_tests, pattern):
 
10
            if pattern is None:
 
11
                pattern = 'test*.py'
 
12
            this_dir = os.path.dirname(__file__)
 
13
            package_tests = loader.discover(start_dir=this_dir, pattern=pattern)
 
14
            standard_tests.addTests(package_tests)
 
15
            return standard_tests
 
16
 
 
17
        unittest.main()
 
18
    else:
 
19
        print >>sys.stderr, 'Unit test discovery requires Python 2.7 or later'
 
20
        try:
 
21
            from pkg_resources import require
 
22
            with_setuptools = require('setuptools')[0].parsed_version
 
23
            print >>sys.stderr, "Use: 'python setup.py test' instead"
 
24
        except ImportError:
 
25
            pass