~ubuntu-branches/ubuntu/precise/devscripts/precise

« back to all changes in this revision

Viewing changes to scripts/devscripts/test/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2011-05-25 09:46:30 UTC
  • Revision ID: james.westby@ubuntu.com-20110525094630-gsd820t94ib5u6kn
Tags: 2.11.0ubuntu1
* Merge from Debian unstable; remaining changes:
  - Demote Recommends to Suggests:
    + libcrypt-ssleay-perl: only needed for a corner case (uscan on SSL
      download sites), wasn't installed by default in previous releases
      either, and seems quite dead upstream; universe only.
    + debian-{keyring,maintainers}: not useful enough in Ubuntu; universe
      only.
    + equivs: too much of a hack to install by default; universe only.
    + libyaml-syck-perl: transition-check is fairly Debian-specific.
  - scripts/debchange.{pl,1}:
    + Adjust --security template for Ubuntu.
    + Add -U/--upstream flag that forces original "just increment
      the end" behaviour; Ubuntu is upstream for some pieces of software.
    + Add --distributor= and DEBCHANGE_DISTRIBUTOR to override lsb_release
      output.
    + Default to "oneiric" as distribution.
    + Add "ubuntu1" to version string for new versions, with tweaks for
      special cases.
    + Add -R/--rebuild flag for Ubuntu's no-change rebuilds.
    + Don't use the last distribution in debian/changelog when doing
      "dch -r" on Ubuntu. "Just because it was last uploaded to jaunty
      doesn't mean that's the right thing to do now." Thanks to Colin
      Watson. (LP: #429288)
  - Add test/debchange.pl, test/Makefile: debchange test suite.
  - Rename XS-Vcs-* to XS-Debian-Vcs-*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Test suite for devscripts
 
2
#
 
3
# Copyright (C) 2010, Stefano Rivera <stefanor@ubuntu.com>
 
4
#
 
5
# Permission to use, copy, modify, and/or distribute this software for any
 
6
# purpose with or without fee is hereby granted, provided that the above
 
7
# copyright notice and this permission notice appear in all copies.
 
8
#
 
9
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
 
10
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 
11
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
 
12
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 
13
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 
14
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
15
# PERFORMANCE OF THIS SOFTWARE.
 
16
 
 
17
import os
 
18
import sys
 
19
 
 
20
if sys.version_info < (2, 7):
 
21
    import unittest2 as unittest
 
22
else:
 
23
    import unittest
 
24
 
 
25
def discover():
 
26
    # import __main__ triggers code re-execution
 
27
    __main__ = sys.modules['__main__']
 
28
    setupDir = os.path.abspath(os.path.dirname(__main__.__file__))
 
29
    return unittest.defaultTestLoader.discover(setupDir)