Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2790A200B50 for ; Tue, 21 Jun 2016 04:41:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 262B5160A55; Tue, 21 Jun 2016 02:41:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 34122160A66 for ; Tue, 21 Jun 2016 04:41:31 +0200 (CEST) Received: (qmail 27572 invoked by uid 500); 21 Jun 2016 02:41:30 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 27563 invoked by uid 99); 21 Jun 2016 02:41:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 02:41:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C40501A04E1 for ; Tue, 21 Jun 2016 02:41:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UpcFhQCZAEGD for ; Tue, 21 Jun 2016 02:41:20 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 56BAC5F4E8 for ; Tue, 21 Jun 2016 02:41:18 +0000 (UTC) Received: (qmail 27212 invoked by uid 99); 21 Jun 2016 02:41:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 02:41:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5B30DE01BD; Tue, 21 Jun 2016 02:41:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: rlei@apache.org To: commits@hawq.incubator.apache.org Date: Tue, 21 Jun 2016 02:41:21 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [05/28] incubator-hawq git commit: HAWQ-837. Add python modules into HAWQ code archived-at: Tue, 21 Jun 2016 02:41:33 -0000 http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test87.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test87.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test87.py new file mode 100644 index 0000000..42f4062 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test87.py @@ -0,0 +1,56 @@ +'test use of True/False' + +True = 1 +False = 0 + +true = 1 +false = 0 + +TRUE = 1 +FALSE = 0 + +def x(a): + 'should warn' + if a == TRUE: + print 'True' + if a == TRUE or \ + a == True or \ + a == true: + print 'True' + if a != false: + print 'false' + if a is 'false': + print 'false' + if a is 'True': + print 'True' + if a is 53343: + print '53343' + if a is 1e7: + print '1e7' + if a is not 'false': + print 'false' + if a is not 'True': + print 'True' + if a is not 53343: + print '53343' + if a is not 1e7: + print '1e7' + +def y(a): + 'should not warn' + if a is True: + print 'True' + if a is not false: + print 'false' + if a == 53343: + print '53343' + if a == 1e7: + print '1e7' + if a == 'TRUE' or \ + a == 'True' or \ + a == 'true': + print 'True' + +def z(a): + return True + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test88.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test88.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test88.py new file mode 100644 index 0000000..e4e2a04 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test88.py @@ -0,0 +1,23 @@ +''' +test depreacted modules (and functions in modules) +also test functions w/security implications +''' + +import os +import gopherlib +import string + +try: + import whrandom +except ImportError: + pass + +def t1(): + 'get rid of warnings about not using deprecated modules' + print whrandom, gopherlib + +def t2(): + print os.tempnam() + print os.tmpnam() + print os.name + print string.atof('5') http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test89.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test89.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test89.py new file mode 100644 index 0000000..8f3fa11 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test89.py @@ -0,0 +1,8 @@ +'doc' + +class Newbie(object): + '''__coerce__ is problematic in new style classes, + see http://python.org/sf/547211 + ''' + def __coerce__(self, o): pass + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test9.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test9.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test9.py new file mode 100644 index 0000000..e104f5b --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test9.py @@ -0,0 +1,17 @@ + +"doc" + +import getopt + +def func(): + "re-importing getopt should complain" + import getopt + print getopt + +def test(): + "this should fail (there is no getopt.xyz)" + try: + print "" + except getopt.xyz: + pass + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test90.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test90.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test90.py new file mode 100644 index 0000000..7e2ff5c --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test90.py @@ -0,0 +1,22 @@ +'test using is/is not on literals' + +def x(a, b, c): + print a is 1 + print a is 's' + print a is 1.32 + print a is () + print a is [] + print a is {} + print a is b + print b is c + print b is None + + print a is not 1 + print a is not 's' + print a is not 1.32 + print a is not () + print a is not [] + print a is not {} + print a is not b + print b is not c + print b is not None http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test92.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test92.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test92.py new file mode 100644 index 0000000..23b5ff1 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test92.py @@ -0,0 +1,6 @@ +'''test using locals in module scope works and there are no spurious warnings''' + +w = '%(u)s' +u = 'a' +result = w % locals() + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test93.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test93.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test93.py new file mode 100644 index 0000000..97edddf --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test93.py @@ -0,0 +1,11 @@ +'docstring' + +def x(a, b): + c = getattr(a, b) + c = getattr(a, b, None) + c = getattr(a, 'c') + c = getattr(a, 'c', None) + print c + + setattr(a, b, None) + setattr(a, 'b', None) http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test94.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test94.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test94.py new file mode 100644 index 0000000..2d674ae --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test94.py @@ -0,0 +1,54 @@ +'docstring' + +def f(a): + a = a + a.b = a.b + a.b.c = a.b.c + a.b.c.d = a.b.c.d + c = a & a + c = a | a + c = a.b | a.b + c = a.b.c | a.b.c + c = a ^ a + c = a.b ^ a.b + c = a.b.c ^ a.b.c + c = a / a + print c + +def g(): + a = b = c = 1 + a = a / 2.0 + a /= 2.0 + a = a + b + a = a & b + a = a << b + a = b << a + print c + a = str(a) + a = `a` + a = -a + a = ~a + +def h(): + a = 1 + a += a + a -= a + a *= a + + a = not a + a = not not a + + a = (1, 2, 3) + a, b, c = a + +def i(a): + z = hash(a.x) & hash(a.y) + z = hash(a.x) | hash(a.y) + z = hash(a.x) ^ hash(a.y) + return z + +def j(x, y): + return (x + 1.0) / (y + 2.0) + +def k(d): + return ((1 << d) | (1 << ((d+4) % 8))) http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test95.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test95.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test95.py new file mode 100644 index 0000000..a2e4d83 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test95.py @@ -0,0 +1,5 @@ +'docstring' + +def try_uni(): + word = "a" + return u"%s \N{RIGHTWARDS ARROW}" % word http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test96.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test96.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test96.py new file mode 100644 index 0000000..8e04759 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test96.py @@ -0,0 +1,15 @@ +'''test using string.find() in if statement as a boolean. it returns an int''' + +class X: + '''check string.find() usage''' + def foo(self): + s = 'abc' + if s.find('ab'): + print 'this is a bug' + if not s.find('ab'): + print 'this is also a bug' + if s.find('ab') >= 0: + print 'this is not a bug' + if s.find('ab') < 0: + print 'this also is not a bug' + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test97.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test97.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test97.py new file mode 100644 index 0000000..29a62ba --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test97.py @@ -0,0 +1,20 @@ +# -*- encoding: latin-1 -*- + +__doc__ = 'nested scopes test' + +u"Bl�b�rgr�d".upper() + +try: + from cStringIO import StringIO +except ImportError: + # this shouldn't cause a warning about catching string exceptions + pass + +def call(proc, y): + proc(y) + +def fun(): + def setfooattr(x, y): + call(lambda z: setattr(x, 'foo', z), y) + + setfooattr(Exception(), 'bar') http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test98.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test98.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test98.py new file mode 100644 index 0000000..3a3bb5a --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test98.py @@ -0,0 +1,33 @@ +# -*- encoding: latin-1 -*- + +__doc__ = 'return value from init reports proper file names' + +from import98 import BaseGood, BaseBad + +class GoodGood(BaseGood): + 'doc' + def __init__(self): + BaseGood.__init__(self) + +class GoodBad(BaseGood): + 'doc' + def __init__(self): + return BaseGood.__init__(self) + +class GoodVoid(BaseGood): + 'doc' + pass + +class BadGood(BaseBad): + 'doc' + def __init__(self): + BaseBad.__init__(self) + +class BadBad(BaseBad): + 'doc' + def __init__(self): + return BaseBad.__init__(self) + +class BadVoid(BaseBad): + 'doc' + pass http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test99.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test99.py b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test99.py new file mode 100644 index 0000000..d4a9c83 --- /dev/null +++ b/tools/bin/pythonSrc/pychecker-0.8.18/test_input/test99.py @@ -0,0 +1,22 @@ +"""None of these should blow up.""" + +class Foo: + """Base class to call during test""" + def __init__(self, *args, **kwargs): pass + +A = B = C = D = 1 + +class AndBar(Foo): + """Base class to call during test""" + def __init__(self): + Foo.__init__(self, style = A & B & C & D) + +class OrBar(Foo): + """Base class to call during test""" + def __init__(self): + Foo.__init__(self, style = A | B | C | D) + +class XorBar(Foo): + """Base class to call during test""" + def __init__(self): + Foo.__init__(self, style = A ^ B ^ C ^ D) http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/PKG-INFO ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/PKG-INFO b/tools/bin/pythonSrc/unittest2-0.5.1/PKG-INFO new file mode 100644 index 0000000..b0a8ca2 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/PKG-INFO @@ -0,0 +1,321 @@ +Metadata-Version: 1.0 +Name: unittest2 +Version: 0.5.1 +Summary: The new features in unittest for Python 2.7 backported to Python 2.3+. +Home-page: http://pypi.python.org/pypi/unittest2 +Author: Michael Foord +Author-email: michael@voidspace.org.uk +License: UNKNOWN +Description: unittest2 is a backport of the new features added to the unittest testing + framework in Python 2.7. It is tested to run on Python 2.4 - 2.7. + + Thanks to Mark Roddy, there is also a version of for Python 2.3. This is + maintained as a separate branch and is a separate download. + + To use unittest2 instead of unittest simply replace ``import unittest`` with + ``import unittest2``. + + unittest2 is maintained in a mercurial repository. The issue tracker is on + google code: + + * `unittest2 hg `_ + * `unittest2 issue tracker + `_ + * `Article / Docs: New features in unittest + `_ + + + Classes in unittest2 derive from the appropriate classes in unittest, so it + should be possible to use the unittest2 test running infrastructure without + having to switch all your tests to using unittest2 immediately. Similarly + you can use the new assert methods on ``unittest2.TestCase`` with the standard + unittest test running infrastructure. Not all of the new features in unittest2 + will work with the standard unittest test loaders, runners result objects + however. + + New features include: + + * ``addCleanups`` - better resource management + * *many* new assert methods including better defaults for comparing lists, + sets, dicts unicode strings etc and the ability to specify new default methods + for comparing specific types + * ``assertRaises`` as context manager, with access to the exception afterwards + * test discovery and new command line options (including failfast and better + handling of ctrl-C during test runs) + * class and module level fixtures: ``setUpClass``, ``tearDownClass``, + ``setUpModule``, ``tearDownModule`` + * test skipping and expected failures + * new ``delta`` keyword argument to ``assertAlmostEqual`` for more useful + comparison and for comparing non-numeric objects (like datetimes) + * ``load_tests`` protocol for loading tests from modules or packages + * ``startTestRun`` and ``stopTestRun`` methods on TestResult + * various other API improvements and fixes + + .. note:: Command line usage + + In Python 2.7 you invoke the unittest command line features (including test + discover) with ``python -m unittest ``. As unittest is a package, and + the ability to invoke packages with ``python -m ...`` is new in Python 2.7, + we can't do this for unittest2. + + Instead unittest2 comes with a script ``unit2``. + `Command line usage + `_:: + + unit2 discover + unit2 -v test_module + + There is also a copy of this script called ``unit2.py``, useful for Windows + which uses file-extensions rather than shebang lines to determine what + program to execute files with. Both of these scripts are installed by + distutils. + + Until I write proper documentation, the best information on all the new features + is the development version of the Python documentation for Python 2.7: + + * http://docs.python.org/dev/library/unittest.html + + Look for notes about features added or changed in Python 2.7. + + .. note:: + + unittest2 is already in use for development of`distutils2 + `_. + + Version 0.5.0 of unittest2 has feature parity with unittest_ in Python 2.7 + final. If you want to ensure that your tests run identically under unittest2 + and unittest in Python 2.7 you should use unittest2 0.5.0. + + Later versions of unittest2 include changes in unittest made in Python 3.2 + and onwards after the release of Python 2.7. + + + .. _unittest: http://docs.python.org/release/2.7/library/unittest.html + + + Differences + =========== + + Differences between unittest2 and unittest in Python 2.7: + + ``assertItemsEqual`` does not silence Py3k warnings as this uses + ``warnings.catch_warnings()`` which is new in Python 2.6 (and is used as a + context manager which would be a pain to make work with Python 2.4). + + The underlying dictionary storing the type equality functions on TestCase is a + custom object rather than a real dictionary. This allows TestCase instances to + be deep-copyable on Python versions prior to 2.7. + + ``TestCase.longMessage`` defaults to True because it is better. It defaults to + False in Python 2.7 for backwards compatibility reasons. + + ``python -m package`` doesn't work in versions of Python before Python 2.7. The + command line features of unittest2 are provided by a ``unit2`` (and + ``unit2.py``) script instead. + + unittest2 includes a very basic setuptools compatible test collector. Specify + ``test_suite = 'unittest2.collector'`` in your setup.py. This starts test + discovery with the default parameters from the directory containing setup.py, so + it is perhaps most useful as an example (see unittest2/collector.py). + + + + Issues + ====== + + A ``TestResult`` object with unexpected successes returns True + for ``result.wasSuccessful()``. Difficult to know if this is the correct + behaviour or not. + + If a dotted path name is used for test discovery then a globally installed + module/package will still be used in preference of one in the current + directory. When doing discovery from a dotted path name we could check for this + specific case. + + The ``removeHandler`` decorator could also be a context manager. + + `Issue 8313: `_, \ + message in unittest tracebacks, is hard to fix in versions of Python before 2.7. + The fix in Python 2.7 relies on changes to both the traceback module and + traceback objects. As the issue is rare I am leaving it unfixed in unittest2. + + There are several places in unittest2 (and unittest) that call ``str(...)`` on + exceptions to get the exception message. This can fail if the exception was + created with non-ascii unicode. This is rare and I won't address it unless it is + actually reported as a problem for someone. + + A comparison of text or long sequences (using ``assertSequenceEqual`` or + ``assertMultiLineEqual`` etc) can take a *long* time to generate diffs for + failure messages. These methods use ``prettyprint`` and ``difflib``. + + + CHANGELOG + ========= + + 2010/07/12 - 0.5.1 + ------------------ + + Reverted script names created by setuptools back to "unit2" instead of + "unit2.py". (Not necessary as setuptools creates stub .exes for console scripts + anyway.) + + + 2010/07/11 - 0.5.0 + ------------------ + + Addition of a setuptools compatible test collector (very basic). Specify + ``test_suite = 'unittest2.collector'`` in your setup.py. + + ``TestSuite.debug()`` and ``TestCase.debug()`` now execute cleanup functions + and class and module level setups and teardowns. + + No longer monkey-patch os.path.relpath for Python 2.4 / 2.5 so that projects + don't accidentally depend on our patching. Contributed by Konrad Delong. + + Added a Python version specific unit2 entrypoint. This will, for example, + create a ``unit2-2.6`` script if unittest2 is installed with Python 2.6. + (Requires setuptools or distribute.) + + Python 2.3 compatibility (in the python2.3 branch of the repository), + contributed by Mark Roddy. + + setuptools console script entry points are created as '.py' scripts on Windows. + + Feature parity with the Python 2.7 final release. + + + 2010/06/06 - 0.4.2 + ------------------ + + Improved help message for ``unit2 discover -h``. + + SkipTest in unittest.TestCase.setUpClass or setUpModule is now reported as a + skip rather than an error. + + Excessively large diffs due to ``TestCase.assertSequenceEqual`` are no + longer included in failure reports. (Controlled by ``TestCase.maxDiff``.) + + Matching files during test discovery is done in ``TestLoader._match_path``. This + method can be overriden in subclasses to, for example, match on the full file + path or use regular expressions for matching. + + Addition of a setuptools compatible entrypoint for the unit2 test runner script. + Contributed by Chris Withers. + + Tests fixed to be compatible with Python 2.7, where deprecation warnings are + silenced by default. + + Feature parity with unittest in Python 2.7 RC 1. + + + 2010/05/09 - 0.4.1 + ------------------ + + If test discovery imports a module from the wrong location (usually because the + module is globally installed and the user is expecting to run tests against a + development version in a different location) then discovery halts with an + ``ImportError`` and the problem is reported. + + Added docstrings to ``assertRegexpMatches`` and ``assertNotRegexpMatches``. + + Putting functions in test suites no longer crashes. + + Feature parity with unittest in Python 2.7 Beta 2. + + 2010/04/08 - 0.4.0 + ------------------ + + Addition of ``removeHandler`` for removing the control-C handler. + + ``delta`` keyword argument for ``assertAlmostEqual`` and + ``assertNotAlmostEqual``. + + Addition of -b command line option (and ``TestResult.buffer``) for buffering + stdout / stderr during test runs. + + Addition of ``TestCase.assertNotRegexpMatches``. + + Allow test discovery using dotted module names instead of a path. + + All imports requiring the signal module are now optional, for compatiblity + with IronPython (or other platforms without this module). + + Tests fixed to be compatible with nosetest. + + + 2010/03/26 - 0.3.0 + ------------------ + + ``assertSameElements`` removed and ``assertItemsEqual`` added; assert that + sequences contain the same elements. + + Addition of -f/--failfast command line option, stopping test run on first + failure or error. + + Addition of -c/--catch command line option for better control-C handling during + test runs. + + Added ``BaseTestSuite``, for use by frameworks that don't want to support shared + class and module fixtures. + + Skipped test methods no longer have ``setUp`` and ``tearDown`` called around + them. + + Faulty ``load_tests`` functions no longer halt test discovery. + + Using non-strings for failure messages now works. + + Potential for ``UnicodeDecodeError`` whilst creating failure messages fixed. + + Split out monolithic test module into a package. + + BUGFIX: Correct usage message now shown for unit2 scripts. + + BUGFIX: ``__unittest`` in module globals trims frames from that module in + reported stacktraces. + + + 2010/03/06 - 0.2.0 + ------------------ + + The ``TextTestRunner`` is now compatible with old result objects and standard + (non-TextTestResult) ``TestResult`` objects. + + ``setUpClass`` / ``tearDownClass`` / ``setUpModule`` / ``tearDownModule`` added. + + + 2010/02/22 - 0.1.6 + ------------------ + + Fix for compatibility with old ``TestResult`` objects. New tests can now be run + with nosetests (with a DeprecationWarning for ``TestResult`` objects without + methods to support skipping etc). + + + 0.1 + --- + + Initial release. + + + TODO + ==== + + * Document ``SkipTest``, ``BaseTestSuite``` + +Keywords: unittest,testing,tests +Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Environment :: Console +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.3 +Classifier: Programming Language :: Python :: 2.4 +Classifier: Programming Language :: Python :: 2.5 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Operating System :: OS Independent +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Software Development :: Testing http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/README.txt ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/README.txt b/tools/bin/pythonSrc/unittest2-0.5.1/README.txt new file mode 100644 index 0000000..27d8e68 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/README.txt @@ -0,0 +1,296 @@ +unittest2 is a backport of the new features added to the unittest testing +framework in Python 2.7. It is tested to run on Python 2.4 - 2.7. + +Thanks to Mark Roddy, there is also a version of for Python 2.3. This is +maintained as a separate branch and is a separate download. + +To use unittest2 instead of unittest simply replace ``import unittest`` with +``import unittest2``. + +unittest2 is maintained in a mercurial repository. The issue tracker is on +google code: + +* `unittest2 hg `_ +* `unittest2 issue tracker + `_ +* `Article / Docs: New features in unittest + `_ + + +Classes in unittest2 derive from the appropriate classes in unittest, so it +should be possible to use the unittest2 test running infrastructure without +having to switch all your tests to using unittest2 immediately. Similarly +you can use the new assert methods on ``unittest2.TestCase`` with the standard +unittest test running infrastructure. Not all of the new features in unittest2 +will work with the standard unittest test loaders, runners result objects +however. + +New features include: + +* ``addCleanups`` - better resource management +* *many* new assert methods including better defaults for comparing lists, + sets, dicts unicode strings etc and the ability to specify new default methods + for comparing specific types +* ``assertRaises`` as context manager, with access to the exception afterwards +* test discovery and new command line options (including failfast and better + handling of ctrl-C during test runs) +* class and module level fixtures: ``setUpClass``, ``tearDownClass``, + ``setUpModule``, ``tearDownModule`` +* test skipping and expected failures +* new ``delta`` keyword argument to ``assertAlmostEqual`` for more useful + comparison and for comparing non-numeric objects (like datetimes) +* ``load_tests`` protocol for loading tests from modules or packages +* ``startTestRun`` and ``stopTestRun`` methods on TestResult +* various other API improvements and fixes + +.. note:: Command line usage + + In Python 2.7 you invoke the unittest command line features (including test + discover) with ``python -m unittest ``. As unittest is a package, and + the ability to invoke packages with ``python -m ...`` is new in Python 2.7, + we can't do this for unittest2. + + Instead unittest2 comes with a script ``unit2``. + `Command line usage + `_:: + + unit2 discover + unit2 -v test_module + + There is also a copy of this script called ``unit2.py``, useful for Windows + which uses file-extensions rather than shebang lines to determine what + program to execute files with. Both of these scripts are installed by + distutils. + +Until I write proper documentation, the best information on all the new features +is the development version of the Python documentation for Python 2.7: + +* http://docs.python.org/dev/library/unittest.html + +Look for notes about features added or changed in Python 2.7. + +.. note:: + + unittest2 is already in use for development of`distutils2 + `_. + + Version 0.5.0 of unittest2 has feature parity with unittest_ in Python 2.7 + final. If you want to ensure that your tests run identically under unittest2 + and unittest in Python 2.7 you should use unittest2 0.5.0. + + Later versions of unittest2 include changes in unittest made in Python 3.2 + and onwards after the release of Python 2.7. + + +.. _unittest: http://docs.python.org/release/2.7/library/unittest.html + + +Differences +=========== + +Differences between unittest2 and unittest in Python 2.7: + +``assertItemsEqual`` does not silence Py3k warnings as this uses +``warnings.catch_warnings()`` which is new in Python 2.6 (and is used as a +context manager which would be a pain to make work with Python 2.4). + +The underlying dictionary storing the type equality functions on TestCase is a +custom object rather than a real dictionary. This allows TestCase instances to +be deep-copyable on Python versions prior to 2.7. + +``TestCase.longMessage`` defaults to True because it is better. It defaults to +False in Python 2.7 for backwards compatibility reasons. + +``python -m package`` doesn't work in versions of Python before Python 2.7. The +command line features of unittest2 are provided by a ``unit2`` (and +``unit2.py``) script instead. + +unittest2 includes a very basic setuptools compatible test collector. Specify +``test_suite = 'unittest2.collector'`` in your setup.py. This starts test +discovery with the default parameters from the directory containing setup.py, so +it is perhaps most useful as an example (see unittest2/collector.py). + + + +Issues +====== + +A ``TestResult`` object with unexpected successes returns True +for ``result.wasSuccessful()``. Difficult to know if this is the correct +behaviour or not. + +If a dotted path name is used for test discovery then a globally installed +module/package will still be used in preference of one in the current +directory. When doing discovery from a dotted path name we could check for this +specific case. + +The ``removeHandler`` decorator could also be a context manager. + +`Issue 8313: `_, \ +message in unittest tracebacks, is hard to fix in versions of Python before 2.7. +The fix in Python 2.7 relies on changes to both the traceback module and +traceback objects. As the issue is rare I am leaving it unfixed in unittest2. + +There are several places in unittest2 (and unittest) that call ``str(...)`` on +exceptions to get the exception message. This can fail if the exception was +created with non-ascii unicode. This is rare and I won't address it unless it is +actually reported as a problem for someone. + +A comparison of text or long sequences (using ``assertSequenceEqual`` or +``assertMultiLineEqual`` etc) can take a *long* time to generate diffs for +failure messages. These methods use ``prettyprint`` and ``difflib``. + + +CHANGELOG +========= + +2010/07/12 - 0.5.1 +------------------ + +Reverted script names created by setuptools back to "unit2" instead of +"unit2.py". (Not necessary as setuptools creates stub .exes for console scripts +anyway.) + + +2010/07/11 - 0.5.0 +------------------ + +Addition of a setuptools compatible test collector (very basic). Specify +``test_suite = 'unittest2.collector'`` in your setup.py. + +``TestSuite.debug()`` and ``TestCase.debug()`` now execute cleanup functions +and class and module level setups and teardowns. + +No longer monkey-patch os.path.relpath for Python 2.4 / 2.5 so that projects +don't accidentally depend on our patching. Contributed by Konrad Delong. + +Added a Python version specific unit2 entrypoint. This will, for example, +create a ``unit2-2.6`` script if unittest2 is installed with Python 2.6. +(Requires setuptools or distribute.) + +Python 2.3 compatibility (in the python2.3 branch of the repository), +contributed by Mark Roddy. + +setuptools console script entry points are created as '.py' scripts on Windows. + +Feature parity with the Python 2.7 final release. + + +2010/06/06 - 0.4.2 +------------------ + +Improved help message for ``unit2 discover -h``. + +SkipTest in unittest.TestCase.setUpClass or setUpModule is now reported as a +skip rather than an error. + +Excessively large diffs due to ``TestCase.assertSequenceEqual`` are no +longer included in failure reports. (Controlled by ``TestCase.maxDiff``.) + +Matching files during test discovery is done in ``TestLoader._match_path``. This +method can be overriden in subclasses to, for example, match on the full file +path or use regular expressions for matching. + +Addition of a setuptools compatible entrypoint for the unit2 test runner script. +Contributed by Chris Withers. + +Tests fixed to be compatible with Python 2.7, where deprecation warnings are +silenced by default. + +Feature parity with unittest in Python 2.7 RC 1. + + +2010/05/09 - 0.4.1 +------------------ + +If test discovery imports a module from the wrong location (usually because the +module is globally installed and the user is expecting to run tests against a +development version in a different location) then discovery halts with an +``ImportError`` and the problem is reported. + +Added docstrings to ``assertRegexpMatches`` and ``assertNotRegexpMatches``. + +Putting functions in test suites no longer crashes. + +Feature parity with unittest in Python 2.7 Beta 2. + +2010/04/08 - 0.4.0 +------------------ + +Addition of ``removeHandler`` for removing the control-C handler. + +``delta`` keyword argument for ``assertAlmostEqual`` and +``assertNotAlmostEqual``. + +Addition of -b command line option (and ``TestResult.buffer``) for buffering +stdout / stderr during test runs. + +Addition of ``TestCase.assertNotRegexpMatches``. + +Allow test discovery using dotted module names instead of a path. + +All imports requiring the signal module are now optional, for compatiblity +with IronPython (or other platforms without this module). + +Tests fixed to be compatible with nosetest. + + +2010/03/26 - 0.3.0 +------------------ + +``assertSameElements`` removed and ``assertItemsEqual`` added; assert that +sequences contain the same elements. + +Addition of -f/--failfast command line option, stopping test run on first +failure or error. + +Addition of -c/--catch command line option for better control-C handling during +test runs. + +Added ``BaseTestSuite``, for use by frameworks that don't want to support shared +class and module fixtures. + +Skipped test methods no longer have ``setUp`` and ``tearDown`` called around +them. + +Faulty ``load_tests`` functions no longer halt test discovery. + +Using non-strings for failure messages now works. + +Potential for ``UnicodeDecodeError`` whilst creating failure messages fixed. + +Split out monolithic test module into a package. + +BUGFIX: Correct usage message now shown for unit2 scripts. + +BUGFIX: ``__unittest`` in module globals trims frames from that module in +reported stacktraces. + + +2010/03/06 - 0.2.0 +------------------ + +The ``TextTestRunner`` is now compatible with old result objects and standard +(non-TextTestResult) ``TestResult`` objects. + +``setUpClass`` / ``tearDownClass`` / ``setUpModule`` / ``tearDownModule`` added. + + +2010/02/22 - 0.1.6 +------------------ + +Fix for compatibility with old ``TestResult`` objects. New tests can now be run +with nosetests (with a DeprecationWarning for ``TestResult`` objects without +methods to support skipping etc). + + +0.1 +--- + +Initial release. + + +TODO +==== + +* Document ``SkipTest``, ``BaseTestSuite``` http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/setup.cfg ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/setup.cfg b/tools/bin/pythonSrc/unittest2-0.5.1/setup.cfg new file mode 100644 index 0000000..3543f2d --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/setup.cfg @@ -0,0 +1,8 @@ +[sdist] +force-manifest = 1 + +[egg_info] +tag_build = +tag_date = 0 +tag_svn_revision = 0 + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/setup.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/setup.py b/tools/bin/pythonSrc/unittest2-0.5.1/setup.py new file mode 100755 index 0000000..8dffe49 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/setup.py @@ -0,0 +1,85 @@ +#! /usr/bin/env python +# setup.py +# Install script for unittest2 +# Copyright (C) 2010 Michael Foord +# E-mail: fuzzyman AT voidspace DOT org DOT uk + +# This software is licensed under the terms of the BSD license. +# http://www.voidspace.org.uk/python/license.shtml + +import os +import sys +from unittest2 import __version__ as VERSION + +NAME = 'unittest2' + +PACKAGES = ['unittest2', 'unittest2.test'] +SCRIPTS = ['unit2.py', 'unit2'] + +DESCRIPTION = ('The new features in unittest for Python 2.7 backported to ' + 'Python 2.3+.') + +URL = 'http://pypi.python.org/pypi/unittest2' + +readme = os.path.join(os.path.dirname(__file__), 'README.txt') +LONG_DESCRIPTION = open(readme).read() + +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.3', + 'Programming Language :: Python :: 2.4', + 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Operating System :: OS Independent', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: Software Development :: Testing', +] + +AUTHOR = 'Michael Foord' + +AUTHOR_EMAIL = 'michael@voidspace.org.uk' + +KEYWORDS = "unittest testing tests".split(' ') + + +params = dict( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + packages=PACKAGES, + scripts=SCRIPTS, + author=AUTHOR, + author_email=AUTHOR_EMAIL, + url=URL, + classifiers=CLASSIFIERS, + keywords=KEYWORDS +) + + +py_version = sys.version[:3] + +SCRIPT1 = 'unit2' +SCRIPT2 = 'unit2-%s' % (py_version,) + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup +else: + params['entry_points'] = { + 'console_scripts': [ + '%s = unittest2:main_' % SCRIPT1, + '%s = unittest2:main_' % SCRIPT2, + ], + } + + params['test_suite'] = 'unittest2.collector' + +setup(**params) http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unit2 ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unit2 b/tools/bin/pythonSrc/unittest2-0.5.1/unit2 new file mode 100755 index 0000000..6d84985 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unit2 @@ -0,0 +1,7 @@ +#! /usr/bin/env python + +__unittest = True + +from unittest2.main import main_ + +main_() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unit2.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unit2.py b/tools/bin/pythonSrc/unittest2-0.5.1/unit2.py new file mode 100644 index 0000000..6d84985 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unit2.py @@ -0,0 +1,7 @@ +#! /usr/bin/env python + +__unittest = True + +from unittest2.main import main_ + +main_() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/PKG-INFO ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/PKG-INFO b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/PKG-INFO new file mode 100644 index 0000000..b0a8ca2 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/PKG-INFO @@ -0,0 +1,321 @@ +Metadata-Version: 1.0 +Name: unittest2 +Version: 0.5.1 +Summary: The new features in unittest for Python 2.7 backported to Python 2.3+. +Home-page: http://pypi.python.org/pypi/unittest2 +Author: Michael Foord +Author-email: michael@voidspace.org.uk +License: UNKNOWN +Description: unittest2 is a backport of the new features added to the unittest testing + framework in Python 2.7. It is tested to run on Python 2.4 - 2.7. + + Thanks to Mark Roddy, there is also a version of for Python 2.3. This is + maintained as a separate branch and is a separate download. + + To use unittest2 instead of unittest simply replace ``import unittest`` with + ``import unittest2``. + + unittest2 is maintained in a mercurial repository. The issue tracker is on + google code: + + * `unittest2 hg `_ + * `unittest2 issue tracker + `_ + * `Article / Docs: New features in unittest + `_ + + + Classes in unittest2 derive from the appropriate classes in unittest, so it + should be possible to use the unittest2 test running infrastructure without + having to switch all your tests to using unittest2 immediately. Similarly + you can use the new assert methods on ``unittest2.TestCase`` with the standard + unittest test running infrastructure. Not all of the new features in unittest2 + will work with the standard unittest test loaders, runners result objects + however. + + New features include: + + * ``addCleanups`` - better resource management + * *many* new assert methods including better defaults for comparing lists, + sets, dicts unicode strings etc and the ability to specify new default methods + for comparing specific types + * ``assertRaises`` as context manager, with access to the exception afterwards + * test discovery and new command line options (including failfast and better + handling of ctrl-C during test runs) + * class and module level fixtures: ``setUpClass``, ``tearDownClass``, + ``setUpModule``, ``tearDownModule`` + * test skipping and expected failures + * new ``delta`` keyword argument to ``assertAlmostEqual`` for more useful + comparison and for comparing non-numeric objects (like datetimes) + * ``load_tests`` protocol for loading tests from modules or packages + * ``startTestRun`` and ``stopTestRun`` methods on TestResult + * various other API improvements and fixes + + .. note:: Command line usage + + In Python 2.7 you invoke the unittest command line features (including test + discover) with ``python -m unittest ``. As unittest is a package, and + the ability to invoke packages with ``python -m ...`` is new in Python 2.7, + we can't do this for unittest2. + + Instead unittest2 comes with a script ``unit2``. + `Command line usage + `_:: + + unit2 discover + unit2 -v test_module + + There is also a copy of this script called ``unit2.py``, useful for Windows + which uses file-extensions rather than shebang lines to determine what + program to execute files with. Both of these scripts are installed by + distutils. + + Until I write proper documentation, the best information on all the new features + is the development version of the Python documentation for Python 2.7: + + * http://docs.python.org/dev/library/unittest.html + + Look for notes about features added or changed in Python 2.7. + + .. note:: + + unittest2 is already in use for development of`distutils2 + `_. + + Version 0.5.0 of unittest2 has feature parity with unittest_ in Python 2.7 + final. If you want to ensure that your tests run identically under unittest2 + and unittest in Python 2.7 you should use unittest2 0.5.0. + + Later versions of unittest2 include changes in unittest made in Python 3.2 + and onwards after the release of Python 2.7. + + + .. _unittest: http://docs.python.org/release/2.7/library/unittest.html + + + Differences + =========== + + Differences between unittest2 and unittest in Python 2.7: + + ``assertItemsEqual`` does not silence Py3k warnings as this uses + ``warnings.catch_warnings()`` which is new in Python 2.6 (and is used as a + context manager which would be a pain to make work with Python 2.4). + + The underlying dictionary storing the type equality functions on TestCase is a + custom object rather than a real dictionary. This allows TestCase instances to + be deep-copyable on Python versions prior to 2.7. + + ``TestCase.longMessage`` defaults to True because it is better. It defaults to + False in Python 2.7 for backwards compatibility reasons. + + ``python -m package`` doesn't work in versions of Python before Python 2.7. The + command line features of unittest2 are provided by a ``unit2`` (and + ``unit2.py``) script instead. + + unittest2 includes a very basic setuptools compatible test collector. Specify + ``test_suite = 'unittest2.collector'`` in your setup.py. This starts test + discovery with the default parameters from the directory containing setup.py, so + it is perhaps most useful as an example (see unittest2/collector.py). + + + + Issues + ====== + + A ``TestResult`` object with unexpected successes returns True + for ``result.wasSuccessful()``. Difficult to know if this is the correct + behaviour or not. + + If a dotted path name is used for test discovery then a globally installed + module/package will still be used in preference of one in the current + directory. When doing discovery from a dotted path name we could check for this + specific case. + + The ``removeHandler`` decorator could also be a context manager. + + `Issue 8313: `_, \ + message in unittest tracebacks, is hard to fix in versions of Python before 2.7. + The fix in Python 2.7 relies on changes to both the traceback module and + traceback objects. As the issue is rare I am leaving it unfixed in unittest2. + + There are several places in unittest2 (and unittest) that call ``str(...)`` on + exceptions to get the exception message. This can fail if the exception was + created with non-ascii unicode. This is rare and I won't address it unless it is + actually reported as a problem for someone. + + A comparison of text or long sequences (using ``assertSequenceEqual`` or + ``assertMultiLineEqual`` etc) can take a *long* time to generate diffs for + failure messages. These methods use ``prettyprint`` and ``difflib``. + + + CHANGELOG + ========= + + 2010/07/12 - 0.5.1 + ------------------ + + Reverted script names created by setuptools back to "unit2" instead of + "unit2.py". (Not necessary as setuptools creates stub .exes for console scripts + anyway.) + + + 2010/07/11 - 0.5.0 + ------------------ + + Addition of a setuptools compatible test collector (very basic). Specify + ``test_suite = 'unittest2.collector'`` in your setup.py. + + ``TestSuite.debug()`` and ``TestCase.debug()`` now execute cleanup functions + and class and module level setups and teardowns. + + No longer monkey-patch os.path.relpath for Python 2.4 / 2.5 so that projects + don't accidentally depend on our patching. Contributed by Konrad Delong. + + Added a Python version specific unit2 entrypoint. This will, for example, + create a ``unit2-2.6`` script if unittest2 is installed with Python 2.6. + (Requires setuptools or distribute.) + + Python 2.3 compatibility (in the python2.3 branch of the repository), + contributed by Mark Roddy. + + setuptools console script entry points are created as '.py' scripts on Windows. + + Feature parity with the Python 2.7 final release. + + + 2010/06/06 - 0.4.2 + ------------------ + + Improved help message for ``unit2 discover -h``. + + SkipTest in unittest.TestCase.setUpClass or setUpModule is now reported as a + skip rather than an error. + + Excessively large diffs due to ``TestCase.assertSequenceEqual`` are no + longer included in failure reports. (Controlled by ``TestCase.maxDiff``.) + + Matching files during test discovery is done in ``TestLoader._match_path``. This + method can be overriden in subclasses to, for example, match on the full file + path or use regular expressions for matching. + + Addition of a setuptools compatible entrypoint for the unit2 test runner script. + Contributed by Chris Withers. + + Tests fixed to be compatible with Python 2.7, where deprecation warnings are + silenced by default. + + Feature parity with unittest in Python 2.7 RC 1. + + + 2010/05/09 - 0.4.1 + ------------------ + + If test discovery imports a module from the wrong location (usually because the + module is globally installed and the user is expecting to run tests against a + development version in a different location) then discovery halts with an + ``ImportError`` and the problem is reported. + + Added docstrings to ``assertRegexpMatches`` and ``assertNotRegexpMatches``. + + Putting functions in test suites no longer crashes. + + Feature parity with unittest in Python 2.7 Beta 2. + + 2010/04/08 - 0.4.0 + ------------------ + + Addition of ``removeHandler`` for removing the control-C handler. + + ``delta`` keyword argument for ``assertAlmostEqual`` and + ``assertNotAlmostEqual``. + + Addition of -b command line option (and ``TestResult.buffer``) for buffering + stdout / stderr during test runs. + + Addition of ``TestCase.assertNotRegexpMatches``. + + Allow test discovery using dotted module names instead of a path. + + All imports requiring the signal module are now optional, for compatiblity + with IronPython (or other platforms without this module). + + Tests fixed to be compatible with nosetest. + + + 2010/03/26 - 0.3.0 + ------------------ + + ``assertSameElements`` removed and ``assertItemsEqual`` added; assert that + sequences contain the same elements. + + Addition of -f/--failfast command line option, stopping test run on first + failure or error. + + Addition of -c/--catch command line option for better control-C handling during + test runs. + + Added ``BaseTestSuite``, for use by frameworks that don't want to support shared + class and module fixtures. + + Skipped test methods no longer have ``setUp`` and ``tearDown`` called around + them. + + Faulty ``load_tests`` functions no longer halt test discovery. + + Using non-strings for failure messages now works. + + Potential for ``UnicodeDecodeError`` whilst creating failure messages fixed. + + Split out monolithic test module into a package. + + BUGFIX: Correct usage message now shown for unit2 scripts. + + BUGFIX: ``__unittest`` in module globals trims frames from that module in + reported stacktraces. + + + 2010/03/06 - 0.2.0 + ------------------ + + The ``TextTestRunner`` is now compatible with old result objects and standard + (non-TextTestResult) ``TestResult`` objects. + + ``setUpClass`` / ``tearDownClass`` / ``setUpModule`` / ``tearDownModule`` added. + + + 2010/02/22 - 0.1.6 + ------------------ + + Fix for compatibility with old ``TestResult`` objects. New tests can now be run + with nosetests (with a DeprecationWarning for ``TestResult`` objects without + methods to support skipping etc). + + + 0.1 + --- + + Initial release. + + + TODO + ==== + + * Document ``SkipTest``, ``BaseTestSuite``` + +Keywords: unittest,testing,tests +Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Environment :: Console +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.3 +Classifier: Programming Language :: Python :: 2.4 +Classifier: Programming Language :: Python :: 2.5 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Operating System :: OS Independent +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Software Development :: Testing http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/SOURCES.txt ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/SOURCES.txt b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/SOURCES.txt new file mode 100644 index 0000000..949938e --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/SOURCES.txt @@ -0,0 +1,39 @@ +README.txt +setup.cfg +setup.py +unit2 +unit2.py +unittest2/__init__.py +unittest2/__main__.py +unittest2/case.py +unittest2/collector.py +unittest2/compatibility.py +unittest2/loader.py +unittest2/main.py +unittest2/result.py +unittest2/runner.py +unittest2/signals.py +unittest2/suite.py +unittest2/util.py +unittest2.egg-info/PKG-INFO +unittest2.egg-info/SOURCES.txt +unittest2.egg-info/dependency_links.txt +unittest2.egg-info/entry_points.txt +unittest2.egg-info/top_level.txt +unittest2/test/__init__.py +unittest2/test/dummy.py +unittest2/test/support.py +unittest2/test/test_assertions.py +unittest2/test/test_break.py +unittest2/test/test_case.py +unittest2/test/test_discovery.py +unittest2/test/test_functiontestcase.py +unittest2/test/test_loader.py +unittest2/test/test_new_tests.py +unittest2/test/test_program.py +unittest2/test/test_result.py +unittest2/test/test_runner.py +unittest2/test/test_setups.py +unittest2/test/test_skipping.py +unittest2/test/test_suite.py +unittest2/test/test_unittest2_with.py \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/dependency_links.txt ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/dependency_links.txt b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/dependency_links.txt @@ -0,0 +1 @@ + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/entry_points.txt ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/entry_points.txt b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/entry_points.txt new file mode 100644 index 0000000..0ff978b --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/entry_points.txt @@ -0,0 +1,4 @@ +[console_scripts] +unit2 = unittest2:main_ +unit2-2.7 = unittest2:main_ + http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/top_level.txt ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/top_level.txt b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/top_level.txt new file mode 100644 index 0000000..9a23970 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2.egg-info/top_level.txt @@ -0,0 +1 @@ +unittest2 http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__init__.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__init__.py b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__init__.py new file mode 100644 index 0000000..11cbadc --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__init__.py @@ -0,0 +1,68 @@ +""" +unittest2 + +unittest2 is a backport of the new features added to the unittest testing +framework in Python 2.7. It is tested to run on Python 2.4 - 2.6. + +To use unittest2 instead of unittest simply replace ``import unittest`` with +``import unittest2``. + + +Copyright (c) 1999-2003 Steve Purcell +Copyright (c) 2003-2010 Python Software Foundation +This module is free software, and you may redistribute it and/or modify +it under the same terms as Python itself, so long as this copyright message +and disclaimer are retained in their original form. + +IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF +THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, +AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, +SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +""" + +__all__ = ['TestResult', 'TestCase', 'TestSuite', + 'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main', + 'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless', + 'expectedFailure', 'TextTestResult', '__version__', 'collector'] + +__version__ = '0.5.1' + +# Expose obsolete functions for backwards compatibility +__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) + + +from unittest2.collector import collector +from unittest2.result import TestResult +from unittest2.case import ( + TestCase, FunctionTestCase, SkipTest, skip, skipIf, + skipUnless, expectedFailure +) +from unittest2.suite import BaseTestSuite, TestSuite +from unittest2.loader import ( + TestLoader, defaultTestLoader, makeSuite, getTestCaseNames, + findTestCases +) +from unittest2.main import TestProgram, main, main_ +from unittest2.runner import TextTestRunner, TextTestResult + +try: + from unittest2.signals import ( + installHandler, registerResult, removeResult, removeHandler + ) +except ImportError: + # Compatibility with platforms that don't have the signal module + pass +else: + __all__.extend(['installHandler', 'registerResult', 'removeResult', + 'removeHandler']) + +# deprecated +_TextTestResult = TextTestResult + +__unittest = True \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__main__.py ---------------------------------------------------------------------- diff --git a/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__main__.py b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__main__.py new file mode 100644 index 0000000..04ed982 --- /dev/null +++ b/tools/bin/pythonSrc/unittest2-0.5.1/unittest2/__main__.py @@ -0,0 +1,10 @@ +"""Main entry point""" + +import sys +if sys.argv[0].endswith("__main__.py"): + sys.argv[0] = "unittest2" + +__unittest = True + +from unittest2.main import main_ +main_()