IRC log of #zope3-dev for Friday, 2010-05-21

*** regebro has quit IRC00:17
*** tarek has quit IRC00:54
*** MrTango has quit IRC01:00
*** povbot` has joined #zope3-dev01:04
*** jpcw has left #zope3-dev01:05
*** sunew has quit IRC01:07
*** r0ver has quit IRC01:08
*** povbot has quit IRC01:08
*** r0ver has joined #zope3-dev01:08
*** fcorrea has quit IRC01:10
*** dunny has quit IRC01:20
*** r0ver has left #zope3-dev01:20
*** redir has quit IRC01:21
*** J1m has quit IRC01:28
*** jan_s_ has quit IRC01:40
*** r0ver has joined #zope3-dev01:51
*** jhauser has quit IRC02:04
*** Azriphale has quit IRC02:14
*** romanofski has joined #zope3-dev02:23
*** r0ver has left #zope3-dev02:39
*** srichter has joined #zope3-dev02:41
*** ChanServ sets mode: +o srichter02:41
*** mcdonc has quit IRC02:45
*** mcdonc has joined #zope3-dev02:45
*** mcdonc_ has joined #zope3-dev03:10
*** mcdonc has quit IRC03:10
*** mcdonc_ has quit IRC03:16
*** grahal has quit IRC03:39
*** fcorrea has joined #zope3-dev03:45
*** fcorrea_ has joined #zope3-dev03:45
*** fcorrea has quit IRC03:45
*** fcorrea_ is now known as fcorrea03:45
*** allisterb has quit IRC03:47
*** allisterb has joined #zope3-dev03:52
*** mcdonc_ has joined #zope3-dev04:15
*** stub has joined #zope3-dev04:21
*** aaronv has quit IRC05:09
*** baijum has joined #zope3-dev05:36
*** davisagli is now known as davisagli|away06:13
*** kursor has joined #zope3-dev06:20
*** baijum has quit IRC06:28
*** kursor has quit IRC06:54
*** huajie has joined #zope3-dev06:58
*** alecm has quit IRC07:09
*** afd_ has joined #zope3-dev07:18
*** davisagli|away is now known as davisagli07:41
*** baijum has joined #zope3-dev07:54
*** jukart has joined #zope3-dev08:00
*** jukart has quit IRC08:12
*** davisagli is now known as davisagli|away08:14
*** alga_ has quit IRC08:16
*** alga has quit IRC08:16
*** timte has joined #zope3-dev08:17
*** jukart has joined #zope3-dev08:39
*** yotaff has joined #zope3-dev08:45
*** astoon has joined #zope3-dev08:52
*** stub has quit IRC09:04
*** alga has joined #zope3-dev09:13
*** alga_ has joined #zope3-dev09:13
*** sweh has joined #zope3-dev09:24
*** MrTango has joined #zope3-dev09:29
*** redir has joined #zope3-dev09:29
*** astoon has quit IRC09:51
*** Theuni1 has quit IRC10:05
*** wosc has joined #zope3-dev10:06
*** wosc has quit IRC10:09
*** wosc has joined #zope3-dev10:11
*** wosc_ has joined #zope3-dev10:14
*** wosc has quit IRC10:14
*** wosc has joined #zope3-dev10:14
*** wosc has quit IRC10:28
*** goschtl has joined #zope3-dev10:38
*** romanofski has quit IRC10:39
*** tarek has joined #zope3-dev10:39
*** regebro has joined #zope3-dev10:41
*** afd_ has quit IRC10:45
*** astoon has joined #zope3-dev11:01
*** zagy has joined #zope3-dev11:02
*** andreypopp has joined #zope3-dev11:03
*** jhauser has joined #zope3-dev11:05
*** MJ has joined #zope3-dev11:12
*** stub has joined #zope3-dev11:12
*** stub has joined #zope3-dev11:12
*** srichter has quit IRC11:14
*** afd_ has joined #zope3-dev11:21
*** Theuni1 has joined #zope3-dev11:27
*** ccomb has joined #zope3-dev11:33
*** astoon has quit IRC11:45
*** romanofski has joined #zope3-dev11:50
*** astoon has joined #zope3-dev12:14
*** kiorky has quit IRC12:44
*** kiorky has joined #zope3-dev12:45
*** kiorky has quit IRC12:49
*** kiorky has joined #zope3-dev12:50
*** ignas has joined #zope3-dev12:51
*** stub has quit IRC13:20
*** astoon has quit IRC13:21
*** Azriphale has joined #zope3-dev13:31
*** benji has quit IRC13:48
*** projekt01 has joined #zope3-dev13:56
*** baijum has quit IRC14:02
*** projekt01 has quit IRC14:03
*** baijum has joined #zope3-dev14:05
*** projekt01 has joined #zope3-dev14:07
*** baijum has quit IRC14:17
*** baijum has joined #zope3-dev14:18
*** astoon has joined #zope3-dev14:27
*** astoon has quit IRC14:37
*** menesis has quit IRC14:38
*** mgedmin has joined #zope3-dev14:42
*** pyqwer has joined #zope3-dev14:48
*** aaronv has joined #zope3-dev14:51
*** jpcw has joined #zope3-dev15:00
*** yotaff has quit IRC15:04
*** benji has joined #zope3-dev15:15
*** lamike has joined #zope3-dev15:17
*** lamike has left #zope3-dev15:17
*** kiorky has quit IRC15:18
*** kiorky has joined #zope3-dev15:18
*** menesis has joined #zope3-dev15:28
*** fcorrea has quit IRC15:38
*** fcorrea has joined #zope3-dev15:43
*** fcorrea has quit IRC15:55
*** J1m has joined #zope3-dev15:57
*** romanofski has quit IRC16:00
*** sweh has quit IRC16:02
*** allisterb has quit IRC16:21
*** fcorrea has joined #zope3-dev16:26
*** sunew has joined #zope3-dev16:34
*** allisterb has joined #zope3-dev16:35
*** Theuni1 has quit IRC16:39
*** huajie has quit IRC16:48
*** aaronv has quit IRC16:50
*** allisterb has quit IRC16:52
*** timte_ has joined #zope3-dev16:57
*** timte has quit IRC16:57
*** timte_ is now known as timte16:57
*** alga_ has quit IRC16:59
*** alga has quit IRC17:01
*** allisterb has joined #zope3-dev17:05
*** baijum has quit IRC17:06
*** huajie has joined #zope3-dev17:07
*** kursor has joined #zope3-dev17:10
*** andreypopp has quit IRC17:20
*** andreypopp has joined #zope3-dev17:20
*** astoon has joined #zope3-dev17:27
*** goschtl has quit IRC17:29
*** projekt01 has quit IRC17:29
*** ignas has quit IRC17:30
*** jfkw has joined #zope3-dev17:31
*** andreypopp has quit IRC17:34
*** timte has quit IRC17:36
*** allisterb has quit IRC17:48
*** huajie has quit IRC17:48
*** jukart has quit IRC17:57
*** sweh has joined #zope3-dev18:00
*** allisterb has joined #zope3-dev18:04
*** baijum has joined #zope3-dev18:04
*** davisagli|away is now known as davisagli18:04
*** davisagli is now known as davisagli|away18:10
*** gary_poster is now known as gary-lunch18:13
*** r0ver has joined #zope3-dev18:20
*** ignas has joined #zope3-dev18:21
*** J1m has quit IRC18:22
*** J1m has joined #zope3-dev18:23
*** r0ver has left #zope3-dev18:25
*** zagy has quit IRC18:28
*** davisagli|away is now known as davisagli18:29
*** mcdonc_ has quit IRC18:29
*** andreypopp has joined #zope3-dev18:36
*** mcdonc has joined #zope3-dev18:39
*** ccomb has quit IRC18:50
*** MJ has quit IRC19:01
*** jhauser has quit IRC19:04
*** gary-lunch is now known as gary_poster19:26
*** menesis has quit IRC19:47
*** andreypopp has quit IRC19:50
*** chrisw1 has joined #zope3-dev19:50
*** Azriphale has quit IRC19:50
chrisw1what's the best way to test code that registers a utility?19:50
chrisw1where can I find good examples?19:50
*** Azriphale has joined #zope3-dev19:52
*** sunew has quit IRC19:54
*** andreypopp has joined #zope3-dev19:57
*** jukart has joined #zope3-dev20:00
*** alecm has joined #zope3-dev20:00
astoonchrisw1: do you mean registration in zcml ?20:00
*** andreypopp has quit IRC20:02
chrisw1astoon: nope, I mean I want to test that my call to registerUtility has done what its supposed to20:04
chrisw1I guess I'm worried about making sure the registry was as I left it20:05
astoonchrisw1: do not worry20:06
chrisw1er?20:06
mgedminchrisw1, if you use zope.app.testing.setup, call setup.placelessSetUp() in your test setUp(), and placelessTearDown() in your test tearDown()20:08
mgedminthat'll ensure you get a fresh clean empty component registry for every test20:08
*** regebro has quit IRC20:08
mgedminor you could unregister your utility manually in the tearDown20:08
chrisw1I'm just using zope.component20:08
mgedminthe unittest2 "addCleanUp" API would be great for this20:08
chrisw1I want to keep these tests as lightweight as possible20:08
mgedminincidentally, I was once bitten very hard by unregisterAdapter/Utility20:08
chrisw1what would i add as a cleanup though?20:09
mgedminlet me think for a moment20:09
chrisw1http://svn.zope.org/zope.component/tags/3.9.4/src/zope/component/testing.py?rev=111710&view=auto is rather confiusing20:10
chrisw1where are the cleanups for the registry added?20:10
mgedminsomewhere in zope.component20:11
mgedminthere's a module-level call to addCleanUp() (unrelated to the unittest2 addClenup() API, BTW)20:11
mgedminthat registers a cleanup function20:11
mgedminall of those get invoked when you do placelessSetUp/tearDown20:11
mgedminyou gotta love import-time side effects if you work on zope320:11
mgedmins/on/with/20:12
mgedminI would use placelessSetUp/tearDown for a unit test of a function that's supposed to invoke registerUtility20:12
mgedminsimplest way20:12
mgedminmaybe not the most efficient one20:12
mgedminruntime-wise20:12
mgedminit _is_ the most efficient one, developer-time-wise20:13
mgedminunless you want to use layers with shared ZCML setup20:13
* chrisw1 is not working on zope3, I just want to use zope.component :-(20:13
mgedminbut that's why I said "unit test", which implies "no layers"20:13
chrisw1right20:13
mgedminsure, zope.component.test.setUp/tearDown should do the trick20:13
chrisw1I want to find the cleanup registration20:13
mgedminif unsure, compare list(getGlobalSiteManager().registrations()) before and after your test20:14
chrisw1any idea where it is?20:14
* mgedmin hates ViewCVS20:14
chrisw1ditto20:14
chrisw1but hey, don't you have a trac mirror?!20:14
mgedminhttp://zope3.pov.lt/trac/browser/zope.component/tags/3.9.4/src/zope/component20:15
mgedminit doesn't let me grep...20:15
mgedminhere: http://zope3.pov.lt/trac/browser/zope.component/tags/3.9.4/src/zope/component/globalregistry.py#L5320:15
chrisw1thankfully I keep all my eggs unzipped20:15
chrisw1and grep does let me grep ;-)20:16
mgedminthis is the import-time code that registers a cleanup handler20:16
chrisw1why the fuck do we still do that?20:16
chrisw1:-(20:16
mgedminthat is then invoked by http://zope3.pov.lt/trac/browser/zope.component/tags/3.9.4/src/zope/component/testing.py20:16
chrisw1and explicty registration of a cleanup would be the way to go...20:16
* mgedmin shrugs20:16
chrisw1I think I'll just use testfixtures' replace functionality to insert a new BaseGlobalComponents for each test20:17
chrisw1...and keep the old one safe!20:17
mgedminthat might work, maybe20:19
*** mgedmin has quit IRC20:19
chrisw1why would it not?20:20
*** astoon has quit IRC20:23
*** regebro has joined #zope3-dev20:32
*** redir has quit IRC20:33
*** ignas has quit IRC20:39
*** Azriphale has quit IRC20:41
*** Azriphale has joined #zope3-dev20:43
*** kursor has quit IRC20:48
*** jukart has quit IRC21:08
*** jpcw has left #zope3-dev21:43
*** mcdonc has quit IRC21:43
*** mcdonc has joined #zope3-dev21:44
*** afd_ has quit IRC22:00
*** redir has joined #zope3-dev22:03
*** baijum has quit IRC22:59
*** r0ver has joined #zope3-dev23:01
*** allisterb has quit IRC23:25
*** pyqwer has quit IRC23:36
*** allisterb has joined #zope3-dev23:38
*** r0ver has left #zope3-dev23:45

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!