~ubuntu-branches/ubuntu/wily/python-mock/wily-proposed

« back to all changes in this revision

Viewing changes to tests/support.py

  • Committer: Bazaar Package Importer
  • Author(s): Fladischer Michael
  • Date: 2011-08-23 13:13:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110823131344-lx8sddj08rlgaryj
Tags: 0.7.2-1
* New upstream release. (Closes: #617799)
* Set PMPT as maintainer and myself as uploader.
* Switch to source format 3.0 (quilt).
* Switch to dh_python2.
* Use pypi.python.org in d/watch.
* Use DEP5 for copyright file.
* Streamline packaging code with wrap-and-sort.
* Bumped Standards-Version to 3.9.2 (no change necessary).
* Move HTML documentation to u/s/d/python-mock/html/.
* Use dh_link to create the documentation source symlinks.
* Set X-P-V to >= 2.4.
* Build for Python3.
* Use dh_sphinxdoc.
* Ship documentation in separate package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sys
 
2
 
 
3
info = sys.version_info
 
4
if info[:3] >= (3, 2, 0):
 
5
    # for Python 3.2 ordinary unittest is fine
 
6
    import unittest as unittest2
 
7
else:
 
8
    import unittest2
 
9
 
 
10
 
 
11
try:
 
12
    # need to turn it into a local variable or we can't
 
13
    # import it from here under Python 2
 
14
    apply = apply
 
15
except NameError:
 
16
    # no apply in Python 3
 
17
    def apply(f, *args, **kw):
 
18
        return f(*args, **kw)
 
19
 
 
20
 
 
21
inPy3k = sys.version_info[0] == 3
 
22
with_available = sys.version_info[:2] >= (2, 5)
 
23
 
 
24
 
 
25
class SomeClass(object):
 
26
    class_attribute = None
 
27
 
 
28
    def wibble(self):
 
29
        pass
 
 
b'\\ No newline at end of file'