[Subversion] / PyProtocols / src / protocols / tests / test_advice.py  

Log of /PyProtocols/src/protocols/tests/test_advice.py

Parent Directory

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


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

Revision 184 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 5 22:43:30 2005 UTC (19 years, 2 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.

Revision 168 - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 20 22:56:25 2004 UTC (19 years, 4 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.

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

Revision 158 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 7 07:29:54 2004 UTC (19 years, 4 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()'.

Revision 156 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 7 06:24:10 2004 UTC (19 years, 4 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).

Revision 150 - (view) (download) (as text) - [select for diffs]
Modified Fri Jul 16 18:02:58 2004 UTC (19 years, 8 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))'.

Revision 148 - (view) (download) (as text) - [select for diffs]
Modified Tue Jul 13 22:30:23 2004 UTC (19 years, 8 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'.

Revision 89 - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 8 00:06:46 2003 UTC (20 years, 4 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

Revision 28 - (view) (download) (as text) - [select for diffs]
Modified Mon May 26 22:05:05 2003 UTC (20 years, 10 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!

Revision 27 - (view) (download) (as text) - [select for diffs]
Modified Mon May 26 20:46:56 2003 UTC (20 years, 10 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.

Revision 24 - (view) (download) (as text) - [select for diffs]
Modified Sun May 25 17:27:35 2003 UTC (20 years, 10 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.

Revision 23 - (view) (download) (as text) - [select for diffs]
Modified Sun May 25 17:21:48 2003 UTC (20 years, 10 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'.

Revision 22 - (view) (download) (as text) - [select for diffs]
Added Sun May 25 16:31:21 2003 UTC (20 years, 10 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