1 2011-05-28T00:17:16  <ThomasWaldmann> habt ihr thinkpad mit chipkartenleser?
   2 2011-05-28T00:29:33  *** RogerHaase has left #moin-dev
   3 2011-05-28T01:14:56  *** m4k3r has quit IRC
   4 2011-05-28T01:49:03  *** ronny has quit IRC
   5 2011-05-28T01:54:42  *** ronny has joined #moin-dev
   6 2011-05-28T03:13:54  *** Marchael has quit IRC
   7 2011-05-28T06:58:20  *** m4k3r has joined #moin-dev
   8 2011-05-28T07:22:11  *** m4k3r has quit IRC
   9 2011-05-28T07:50:28  *** m4k3r has joined #moin-dev
  10 2011-05-28T08:10:47  *** m4k3r has quit IRC
  11 2011-05-28T08:23:47  <dreimark> moin
  12 2011-05-28T08:24:02  <dreimark> ThomasWaldmann: http://test.moinmo.in/Test
  13 2011-05-28T08:24:13  <dreimark> what makes it that default witdt
  14 2011-05-28T08:26:01  <dreimark> s/witdt/width
  15 2011-05-28T09:46:54  *** grzywacz has joined #moin-dev
  16 2011-05-28T09:46:54  *** grzywacz has joined #moin-dev
  17 2011-05-28T09:48:29  <ThomasWaldmann> browser?
  18 2011-05-28T09:51:05  <dreimark> ff 4 and ff 3.6
  19 2011-05-28T09:51:23  <dreimark> it looks like to have a width of 200
  20 2011-05-28T11:58:18  *** franklin has joined #moin-dev
  21 2011-05-28T11:58:45  *** pkumar has joined #moin-dev
  22 2011-05-28T11:59:19  *** franklin_ has quit IRC
  23 2011-05-28T12:11:33  <pkumar> ronny: http://paste.pocoo.org/show/396593/
  24 2011-05-28T12:12:02  <pkumar> ronny: line 150
  25 2011-05-28T12:12:51  <ronny> pkumar: a function object is always true
  26 2011-05-28T12:13:02  <ronny> pkumar: also where o you intercept makeitem?
  27 2011-05-28T12:15:34  <pkumar> so, need to add a condition inside pytest_makeitem, is it? for generator functions?
  28 2011-05-28T12:15:58  <pkumar> ronny:^
  29 2011-05-28T12:16:20  <ronny> pkumar: yes
  30 2011-05-28T12:16:47  <ronny> pkumar: if obj is a generatorfunction, you need to return a function item
  31 2011-05-28T12:17:15  <ronny> and in the pyfunc_call, you need to check if item.obj is a generatorfunction, and iterate the items, also make a comment about the hack
  32 2011-05-28T12:19:05  <pkumar> so, if it is generatorfunction just creating a loop for iteration should do right?
  33 2011-05-28T12:19:35  <ronny> yes, you also need to run the checks
  34 2011-05-28T12:21:42  <pkumar> ronny: check if it is generatorfunction thats it right? any other thing to check?
  35 2011-05-28T12:22:21  <ronny> pkumar: currently im not aware of something else
  36 2011-05-28T12:22:45  <pkumar> all right, thanks.
  37 2011-05-28T12:36:21  <ronny> pkumar: im wondering if it would make sense to have a MoinFunction item that deals with app setup/teardown in general
  38 2011-05-28T12:37:07  <ronny> (that would remove the decoration hacks in MoinClass
  39 2011-05-28T12:37:51  <ronny> pkumar: hmm
  40 2011-05-28T12:38:11  <ronny> actually i think it can be done in setup/teardown hooks, let me do some quick checks
  41 2011-05-28T12:39:24  <pkumar> ronny: sure
  42 2011-05-28T12:47:23  <ronny> pkumar: ok, looks like it can be done in pytest_runtest_setup and pytest_runtest_teardown
  43 2011-05-28T12:48:53  <pkumar> that sounds great
  44 2011-05-28T12:49:21  <ronny> but i dont understand how it interacts with setupstate
  45 2011-05-28T12:49:44  <pkumar> hmm
  46 2011-05-28T12:50:12  <ronny> pkumar: for now the best intermediate step would be to have a MoinTestFunction that inherits from function
  47 2011-05-28T12:51:14  <ronny> and override the setup/teardown methods to generate the app/ctx objects
  48 2011-05-28T12:51:38  <ronny> that will be used for all methods/functions
  49 2011-05-28T12:51:53  <ronny> and a custom call hook will act if the function is a generator, and iterate it
  50 2011-05-28T12:52:53  <pkumar> inherits from which function?
  51 2011-05-28T12:53:17  <ronny> pytest.collect.Function
  52 2011-05-28T12:53:32  <pkumar> okay
  53 2011-05-28T12:54:13  <ronny> check out how setup/teardown works for those, then you will know how to override in order to get the same behaviour as of now
  54 2011-05-28T12:55:36  <ronny> if it doesnt seem obvious, ask (i might be a bit too familiar with that code)
  55 2011-05-28T12:56:21  <pkumar> ronny: though I've got an overview of working of setup and teardown, need to be more clear about it.
  56 2011-05-28T12:58:30  *** greg_f has joined #moin-dev
  57 2011-05-28T13:00:19  <ronny> pkumar: basically use super calls, have app /ctx creation happen before setup_method calling and app/ctx destruction after teardown_method
  58 2011-05-28T13:03:31  <pkumar> ronny: What exactly the wrapper function does?
  59 2011-05-28T13:05:55  <ronny> pkumar: its kind of a hack, basically if a test class has a setup_method/teardown_method, it will decorate it with app/ctx creation
  60 2011-05-28T13:23:31  <pkumar> ronny: So, are we planning to have this MoinTestFunction inside class MoinClassCollector or as a separate function?
  61 2011-05-28T13:26:22  <pkumar> since we have to override setup and teardown methods
  62 2011-05-28T13:28:12  <ronny> pkumar: it will replace MoinClassCollector
  63 2011-05-28T13:31:03  <pkumar> currently, MoinClassCollector overrides setup/teardown methods to generate app/ctx objects but don't have a custom hook in it right?
  64 2011-05-28T13:31:08  <pkumar> ronny:^
  65 2011-05-28T13:32:01  <ronny> pkumar: the hook isnt needed, you will just override setup/teardown of items
  66 2011-05-28T13:41:32  <pkumar> ronny: basically, we need to modify current setup/teardown methods to check if the function is generator and iterate it, if it is. right?
  67 2011-05-28T13:42:11  <ronny> no
  68 2011-05-28T13:49:36  <pkumar> or is it like:  we'll have a new MoinTestFunction which overrides the setup/teardown and check if the function is generator and iterate it?
  69 2011-05-28T13:49:51  <ronny> yeah
  70 2011-05-28T13:49:59  <ronny> well, it will not handle the iteration
  71 2011-05-28T13:50:03  <ronny> the pyfunc_call hook will
  72 2011-05-28T13:50:14  <ronny> MoinTestFunction will just handle app setup
  73 2011-05-28T13:53:57  <pkumar> Can you please help me understand that how our new idea will be better than currently used MoinClassCollector and just using a pyfunc_call with it?
  74 2011-05-28T13:54:03  <pkumar> ronny: ^
  75 2011-05-28T13:57:16  <pkumar> I mean, why are we not going for your previous idea?
  76 2011-05-28T13:58:30  <ronny> pkumar: cause the previous idea only messes around with functions, the new idea also gets rid of the hacks in the classcollector
  77 2011-05-28T13:58:44  <ronny> classcollector is bascially at the wrong level wrt setup/teardown
  78 2011-05-28T13:59:54  <pkumar> ok, got it.
  79 2011-05-28T14:04:53  <pkumar> ronny: won't we be needing all those hacks once we try to override the setup/teardown once again or we won't because we are using MonTestFinction which is inherited from pytest.collect.Function?
  80 2011-05-28T14:05:16  <pkumar> MoinTestFunction*
  81 2011-05-28T14:14:46  <ronny> pkumar: it will not have to hook monkeypatch the class, you can just override setup/teardown, and add a step
  82 2011-05-28T14:26:26  *** m4k3r has joined #moin-dev
  83 2011-05-28T14:43:22  <pkumar> ronny: http://paste.pocoo.org/show/396630/
  84 2011-05-28T14:44:02  <pkumar> just a mom
  85 2011-05-28T14:49:37  <ronny> pkumar: please read that loop carefully, then think about whether it makes sense
  86 2011-05-28T14:50:55  <ronny> note that you need to call the generator, and call all checks it yields
  87 2011-05-28T14:52:55  <ronny> bbl, lunch
  88 2011-05-28T14:53:07  <pkumar> ronny: sorry, that was a wrong url
  89 2011-05-28T15:15:27  <ronny> re
  90 2011-05-28T15:58:04  <pkumar> bbl
  91 2011-05-28T15:58:33  *** pkumar has quit IRC
  92 2011-05-28T16:02:18  <ThomasWaldmann> re
  93 2011-05-28T16:25:33  *** RogerHaase has joined #moin-dev
  94 2011-05-28T18:00:52  <ThomasWaldmann> re2
  95 2011-05-28T18:28:03  <dreimark> bbl2
  96 2011-05-28T19:28:17  *** hardy_89 has joined #moin-dev
  97 2011-05-28T19:37:57  *** hardy_89 has quit IRC
  98 2011-05-28T19:42:50  *** hardy_89 has joined #moin-dev
  99 2011-05-28T20:11:50  *** greg_f has quit IRC
 100 2011-05-28T20:24:59  *** hardy_89 has quit IRC
 101 2011-05-28T21:59:02  *** ronny has quit IRC
 102 2011-05-28T22:05:50  *** ronny has joined #moin-dev
 103 2011-05-28T22:16:20  *** Gnarlodious has joined #moin-dev
 104 2011-05-28T22:20:09  *** grzywacz has quit IRC
 105 2011-05-28T22:22:07  *** Gnarlodious has quit IRC
 106 2011-05-28T23:20:03  <dreimark> re

MoinMoin: MoinMoinChat/Logs/moin-dev/2011-05-28 (last edited 2011-05-27 22:45:03 by IrcLogImporter)