[Subversion] / DecoratorTools / test_decorators.py  

Log of /DecoratorTools/test_decorators.py

Parent Directory

No default branch
Bookmark a link to HEAD: (view) (download) (as text)


Revision 2727 - (view) (download) (as text) - [select for diffs]
Modified Fri Apr 3 23:33:46 2015 UTC (5 years, 6 months ago) by pje
File length: 6938 byte(s)
Diff to previous 2722
Experimental support for Python 3 (tested clean on 3.1 & 3.2)

Revision 2722 - (view) (download) (as text) - [select for diffs]
Modified Fri Apr 3 21:15:53 2015 UTC (5 years, 6 months ago) by pje
File length: 6714 byte(s)
Diff to previous 2614
Fix spurious test failure on Python 2.7+

Revision 2614 - (view) (download) (as text) - [select for diffs]
Modified Fri Jun 11 01:21:31 2010 UTC (10 years, 4 months ago) by pje
File length: 6511 byte(s)
Diff to previous 2608
Refactor tracing mechanism to be less intrusive; specifically, don't
install a global trace hook if one's already in place, don't uninstall
it if we didn't install it, and make sure that uninstallations happen
in the correct chaining order.  This may fix some long-standing issues
with debuggers (such as PyDev) that use different local and global 
tracing functions.

Revision 2608 - (view) (download) (as text) - [select for diffs]
Modified Wed May 5 17:56:17 2010 UTC (10 years, 5 months ago) by pje
File length: 5627 byte(s)
Diff to previous 2202
Changes since version 1.7:

  * The ``@template_function`` decorator now supports using a return value
    instead of a docstring, in order to work with the "-OO" option to Python;
    it's highly recommended that you update your template functions to use
    a return value instead of a docstring.  (The error message has also been
    improved for the missing docstring case.)

  * Fixed metaclass collisions in ``classy`` subclasses that mix in abstract
    classes (e.g. ``collections.Sequence``) in Python 2.6+.


Revision 2202 - (view) (download) (as text) - [select for diffs]
Modified Tue Jul 4 16:09:08 2006 UTC (14 years, 3 months ago) by pje
File length: 4749 byte(s)
Diff to previous 2147
Add 'struct()' decorator for quick-and-dirty data structure types.

Revision 2147 - (view) (download) (as text) - [select for diffs]
Modified Thu May 25 01:53:52 2006 UTC (14 years, 5 months ago) by pje
File length: 4584 byte(s)
Copied from: PyProtocols/src/protocols/tests/test_advice.py revision 2085
Diff to previous 2082
Initial checkin of DecoratorTools.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 2082 - (view) (download) (as text) - [select for diffs]
Modified Sat Jul 16 16:31:04 2005 UTC (15 years, 3 months ago) by pje
File length: 7381 byte(s)
Diff to previous 184
Remove 'dispatch' package from PyProtocols, as it's now in RuleDispatch

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 184 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 5 22:43:30 2005 UTC (15 years, 9 months ago) by pje
File length: 6867 byte(s)
Diff to previous 168
Get rid of "class" vs. "class-exec" distinction for 'getFrameInfo()'; it
is more a source of errors than anything else.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 168 - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 20 22:56:25 2004 UTC (15 years, 11 months ago) by pje
File length: 6872 byte(s)
Diff to previous 161
Added support to make 'protocols.advise()' operate correctly in a doctest
or other 'exec' scenario.  'protocols.advice.getFrameInfo()' now returns
a 'kind' of '"class-exec"' for that situation.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 161 - (view) (download) (as text) - [select for diffs]
Modified Wed Nov 10 04:19:56 2004 UTC (15 years, 11 months ago) by pje
File length: 6617 byte(s)
Diff to previous 158
Make advice functions accept either 'depth' or 'frame' target.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 158 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 7 07:29:54 2004 UTC (15 years, 11 months ago) by pje
File length: 6598 byte(s)
Diff to previous 156
Reorganized modules to minimize the 'dispatch' package's startup footprint.
Also, made the 'as()' function available as 'dispatch.as()'.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 156 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 7 06:24:10 2004 UTC (15 years, 11 months ago) by pje
File length: 6564 byte(s)
Diff to previous 150
Added 'dispatch.SimpleGeneric' for single-dispatch generic functions.  You
can use 'dispatch.when()' and 'defmethod()' to set it up, just as described
in:

    http://www.eby-sarna.com/pipermail/peak/2004-November/001903.html

Also, 'protocols.advice.add_assignment_advisor' has been overhauled to
semi-transparently support Python 2.4 '@' decorators, but the callback
interface had to be changed significantly (there's a new required
parameter for callbacks, and callbacks must now return a value instead of
munging the frame locals).

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 150 - (view) (download) (as text) - [select for diffs]
Modified Fri Jul 16 18:02:58 2004 UTC (16 years, 3 months ago) by pje
File length: 6156 byte(s)
Diff to previous 148
Implement experimental 'as' function.  'as' lets you do things like:

    [as(classmethod)]
    def foo(cls, ...):
        ...

    [as(binding.Make, events.taskFactory)]
    def someTask(self, ...):
        ...

Decorators are applied right-to-left, so that the second example above
equates to 'someTask = binding.Make(events.taskFactory(someTask))'.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 148 - (view) (download) (as text) - [select for diffs]
Modified Tue Jul 13 22:30:23 2004 UTC (16 years, 3 months ago) by pje
File length: 5958 byte(s)
Diff to previous 89
Implementation and first use of 'when()' decorator.  Other decorators are
now possible as well, using 'protocols.advice.add_assignment_advisor'.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 89 - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 8 00:06:46 2003 UTC (16 years, 11 months ago) by pje
File length: 5268 byte(s)
Diff to previous 28
Fixed test to better check frame semantics across Python 2.2/2.3

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 28 - (view) (download) (as text) - [select for diffs]
Modified Mon May 26 22:05:05 2003 UTC (17 years, 5 months ago) by pje
File length: 5251 byte(s)
Diff to previous 27
Ran out of things to test (I hope).  :)  Fixed a few minor bugs.  In
particular, the "classic MRO" code was broken, listener addition wasn't
thread safe, and under 2.3 it would've been possible to change an
Interface's __bases__ and break its implication invariants.
I believe this completes the test suite and the fixing of the many API
issues that came up while trying to write docs.  So, I should be able to
get back on docs now.  Unfortunately, writing the tests brought things to
my attention that should be mentioned in the docs, so now I'm "further
behind" than when I started!

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 27 - (view) (download) (as text) - [select for diffs]
Modified Mon May 26 20:46:56 2003 UTC (17 years, 5 months ago) by pje
File length: 4630 byte(s)
Diff to previous 24
What you test, is what you get.  :)  PyProtocols now runs almost as many
tests as the rest of PEAK put together, and I caught and fixed a few more
subtle (although minor) bugs.  Only a few more files full of tests like
this, and PyProtocols should be ready to go, codewise.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 24 - (view) (download) (as text) - [select for diffs]
Modified Sun May 25 17:27:35 2003 UTC (17 years, 5 months ago) by pje
File length: 3748 byte(s)
Diff to previous 23
Fixed another little corner case in supermeta(), added test to catch it.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 23 - (view) (download) (as text) - [select for diffs]
Modified Sun May 25 17:21:48 2003 UTC (17 years, 5 months ago) by pje
File length: 3492 byte(s)
Diff to previous 22
Added tests for 'metamethod' and 'supermeta'; fixed some issues
w/robustness of 'supermeta'.

Filename: PyProtocols/src/protocols/tests/test_advice.py
Revision 22 - (view) (download) (as text) - [select for diffs]
Added Sun May 25 16:31:21 2003 UTC (17 years, 5 months ago) by pje
File length: 2261 byte(s)
Added rudimentary test suite - really just the 'advice' tests from PEAK.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help