From holger at merlinux.de Fri Apr 6 19:32:16 2007 From: holger at merlinux.de (holger krekel) Date: Fri, 6 Apr 2007 19:32:16 +0200 Subject: [py-dev] py.test and twisted In-Reply-To: <932f8baf0702200120k2d55fc58kd23afd3f6ae4d36c@mail.gmail.com> References: <932f8baf0702200120k2d55fc58kd23afd3f6ae4d36c@mail.gmail.com> Message-ID: <20070406173216.GI18225@solar.trillke> Hi Ralf, sorry for missing out on answering. On Tue, Feb 20, 2007 at 10:20 +0100, Ralf Schmitt wrote: > Hi all, > > I've made py.test work with the twisted framework using greenlets to switch > between twisted's mainloop and py.test's "mainloop". (see attached file). > It currently uses monkeypatching to change py.test.Item's execute function. > Currently missing is the ability to return twisted deferreds from setup and > teardown methods. > I could monkeypatch py.test even more, but I'd rather have a method to hook > into py.test, and intercept any calls to user supplied functions (i.e. > teardown, setup, and test methods). Any chance to get such changes > integrated into py.test? I'd be willing to write them on my own and would > also be glad to have the py.test.twisted script be included into py.test. yes, let's consider how to integrate twisted support - however, from my side not much before May - i still need to recover from the recent PyPy release and report rushs ... best, holger From faassen at startifact.com Fri Apr 13 19:21:34 2007 From: faassen at startifact.com (Martijn Faassen) Date: Fri, 13 Apr 2007 19:21:34 +0200 Subject: [py-dev] unwedging the cheeseshop for py In-Reply-To: References: Message-ID: Martijn Faassen wrote: [snip] > I think Holger might be a good person to contact them, as luckily he's > listed as the author, so there's a good chance he'll be believed. > > I'd be nice if we could figure out who this 'rocky' person is... Any progress on this? Should I contact the cheeseshop myself? Holger, what's your cheeseshop username? Regards, Martijn From holger at merlinux.de Fri Apr 13 20:11:23 2007 From: holger at merlinux.de (holger krekel) Date: Fri, 13 Apr 2007 20:11:23 +0200 Subject: [py-dev] unwedging the cheeseshop for py In-Reply-To: References: Message-ID: <20070413181123.GM18225@solar.trillke> On Fri, Apr 13, 2007 at 19:21 +0200, Martijn Faassen wrote: > Martijn Faassen wrote: > [snip] > > I think Holger might be a good person to contact them, as luckily he's > > listed as the author, so there's a good chance he'll be believed. > > > > I'd be nice if we could figure out who this 'rocky' person is... > > Any progress on this? Should I contact the cheeseshop myself? Holger, > what's your cheeseshop username? no progress yet - if you can get py lib to be owned by "hpk at trillke.net" that would help (i just verified i can login). I'd prefer it to have multiple people be able to modify things - do you know if that is possible? thanks for caring, holger From ianb at colorstudy.com Fri Apr 13 20:14:51 2007 From: ianb at colorstudy.com (Ian Bicking) Date: Fri, 13 Apr 2007 13:14:51 -0500 Subject: [py-dev] unwedging the cheeseshop for py In-Reply-To: <20070413181123.GM18225@solar.trillke> References: <20070413181123.GM18225@solar.trillke> Message-ID: <461FC89B.8000609@colorstudy.com> holger krekel wrote: > On Fri, Apr 13, 2007 at 19:21 +0200, Martijn Faassen wrote: >> Martijn Faassen wrote: >> [snip] >>> I think Holger might be a good person to contact them, as luckily he's >>> listed as the author, so there's a good chance he'll be believed. >>> >>> I'd be nice if we could figure out who this 'rocky' person is... >> Any progress on this? Should I contact the cheeseshop myself? Holger, >> what's your cheeseshop username? > > no progress yet - if you can get py lib to be owned by "hpk at trillke.net" > that would help (i just verified i can login). I'd prefer it to have > multiple people be able to modify things - do you know if that is possible? Yes, once you login you can set up multiple owners or maintainers. You can also email catalog-sig or Richard Jones to fix a user/permission problem. -- Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers From holger at merlinux.de Sun Apr 15 20:48:31 2007 From: holger at merlinux.de (holger krekel) Date: Sun, 15 Apr 2007 20:48:31 +0200 Subject: [py-dev] unwedging the cheeseshop for py In-Reply-To: <461FC89B.8000609@colorstudy.com> References: <20070413181123.GM18225@solar.trillke> <461FC89B.8000609@colorstudy.com> Message-ID: <20070415184831.GA25045@solar.trillke> Hi Ian, On Fri, Apr 13, 2007 at 13:14 -0500, Ian Bicking wrote: > holger krekel wrote: > >On Fri, Apr 13, 2007 at 19:21 +0200, Martijn Faassen wrote: > >>Martijn Faassen wrote: > >>[snip] > >>>I think Holger might be a good person to contact them, as luckily he's > >>>listed as the author, so there's a good chance he'll be believed. > >>> > >>>I'd be nice if we could figure out who this 'rocky' person is... > >>Any progress on this? Should I contact the cheeseshop myself? Holger, > >>what's your cheeseshop username? > > > >no progress yet - if you can get py lib to be owned by "hpk at trillke.net" > >that would help (i just verified i can login). I'd prefer it to have > >multiple people be able to modify things - do you know if that is > >possible? > > Yes, once you login you can set up multiple owners or maintainers. You > can also email catalog-sig or Richard Jones to fix a user/permission > problem. thanks, did that and am now the maintainer ... didn't do anything yet with it. If anyone has an account and wants to co-maintain, please drop me a note, so i can add you (would be good to have more than one person having access there, i think). holger From holger at merlinux.de Fri Apr 20 07:46:20 2007 From: holger at merlinux.de (holger krekel) Date: Fri, 20 Apr 2007 07:46:20 +0200 Subject: [py-dev] [xoraxax@codespeak.net: [py-svn] r42188 - py/trunk/py/test] Message-ID: <20070420054620.GE25045@solar.trillke> Hi Alexander, (cc py-dev), if you want to revive this, then please also the test - and it's better to copy the old revision (svn cp can do that, i think) then to re-add it and loose all history. I am not sure, i am in favour of re-adding this, though. do you actually use it? holger ----- Forwarded message from xoraxax at codespeak.net ----- From: xoraxax at codespeak.net To: py-svn at codespeak.net Date: Fri, 20 Apr 2007 00:39:27 +0200 (CEST) Subject: [py-svn] r42188 - py/trunk/py/test X-Spambayes-Classification: ham; 0.00 Author: xoraxax Date: Fri Apr 20 00:39:27 2007 New Revision: 42188 Added: py/trunk/py/test/compat.py Log: Revive test/compat.py again, seems to work fine for me. Can be used by patching sys.modules["unittest"] in the conftest.py file. Added: py/trunk/py/test/compat.py ============================================================================== --- (empty file) +++ py/trunk/py/test/compat.py Fri Apr 20 00:39:27 2007 @@ -0,0 +1,59 @@ +import py +from py.__.test.outcome import Failed, Passed + + +class TestCaseUnit(py.test.collect.Function): + """ compatibility Unit executor for TestCase methods + honouring setUp and tearDown semantics. + """ + def execute(self, session): + boundmethod = self.obj + instance = boundmethod.im_self + instance.setUp() + try: + boundmethod() + finally: + instance.tearDown() + return Passed() + +class TestCase(object): + """compatibility class of unittest's TestCase. """ + Function = TestCaseUnit + + def setUp(self): + pass + + def tearDown(self): + pass + + def fail(self, msg=None): + """ fail immediate with given message. """ + raise Failed(msg=msg) + + def assertRaises(self, excclass, func, *args, **kwargs): + py.test.raises(excclass, func, *args, **kwargs) + failUnlessRaises = assertRaises + + # dynamically construct (redundant) methods + aliasmap = [ + ('x', 'not x', 'assert_, failUnless'), + ('x', 'x', 'failIf'), + ('x,y', 'x!=y', 'failUnlessEqual,assertEqual, assertEquals'), + ('x,y', 'x==y', 'failIfEqual,assertNotEqual, assertNotEquals'), + ] + items = [] + for sig, expr, names in aliasmap: + names = map(str.strip, names.split(',')) + sigsubst = expr.replace('y', '%s').replace('x', '%s') + for name in names: + items.append(""" + def %(name)s(self, %(sig)s, msg=""): + __tracebackhide__ = True + if %(expr)s: + raise Failed(msg=msg + (%(sigsubst)r %% (%(sig)s))) + """ % locals() ) + + source = "".join(items) + exec py.code.Source(source).compile() + +__all__ = ['TestCase'] _______________________________________________ py-svn mailing list py-svn at codespeak.net http://codespeak.net/mailman/listinfo/py-svn ----- End forwarded message ----- -- merlinux GmbH Steinbergstr. 42 31139 Hildesheim http://merlinux.de tel +49 5121 20800 75 (fax 77) From mailinglist at alexanderweb.de Fri Apr 20 18:28:36 2007 From: mailinglist at alexanderweb.de (Alexander Schremmer) Date: Fri, 20 Apr 2007 18:28:36 +0200 Subject: [py-dev] [xoraxax@codespeak.net: [py-svn] r42188 - py/trunk/py/test] In-Reply-To: <20070420054620.GE25045@solar.trillke> References: <20070420054620.GE25045@solar.trillke> Message-ID: <1177086516.29463.1.camel@tuxpaddy> Hi Holger, Am Freitag, den 20.04.2007, 07:46 +0200 schrieb holger krekel: > if you want to revive this, then please also the test - and it's > better to copy the old revision (svn cp can do that, i think) > then to re-add it and loose all history. Yes, I thought about that as well (too late, though :-)). > I am not sure, i am in favour of re-adding this, though. > do you actually use it? Yes, I am using it to run MoinMoin's legacy tests using py.test. I will try to find the test ... Kind regards, Alexander From holger at merlinux.de Fri Apr 20 18:39:56 2007 From: holger at merlinux.de (holger krekel) Date: Fri, 20 Apr 2007 18:39:56 +0200 Subject: [py-dev] [xoraxax@codespeak.net: [py-svn] r42188 - py/trunk/py/test] In-Reply-To: <1177086516.29463.1.camel@tuxpaddy> References: <20070420054620.GE25045@solar.trillke> <1177086516.29463.1.camel@tuxpaddy> Message-ID: <20070420163956.GM25045@solar.trillke> Hi Alexander, On Fri, Apr 20, 2007 at 18:28 +0200, Alexander Schremmer wrote: > Hi Holger, > > Am Freitag, den 20.04.2007, 07:46 +0200 schrieb holger krekel: > > > if you want to revive this, then please also the test - and it's > > better to copy the old revision (svn cp can do that, i think) > > then to re-add it and loose all history. > > Yes, I thought about that as well (too late, though :-)). no, it's not too late, just remove and do a proper copy :) otoh, if you are to "svn blame" for it all, that's not bad, either :) > > I am not sure, i am in favour of re-adding this, though. > > do you actually use it? > > Yes, I am using it to run MoinMoin's legacy tests using py.test. interesting that this works well enough. ok then - let's leave it in for now. I am just scared that people may want to have even more legacy support, i guess. Also it's not documented/advertised at all. > I will try to find the test ... it should be in py/test/testing/test_compat.py - maybe just check the "svn log -v" for when it got removed. best & thanks, holger