2006-07-18T07:37:29  *** irc.freenode.net sets mode: +o ChanServ
2006-07-18T11:09:19  <ThomasWaldmann> moin
2006-07-18T11:22:49  <Kepplar> moin
2006-07-18T11:29:20  <ThomasWaldmann> did you find out how to create a request?
2006-07-18T11:50:24  <ThomasWaldmann> xorAxAx: http://hg.thinkmo.de/moin/1.6?fd=fbbee7e00ffe;file=MoinMoin/action/__init__.py
2006-07-18T11:51:19  <xorAxAx> umm
2006-07-18T11:52:09  <xorAxAx> ThomasWaldmann: it comes from your branch
2006-07-18T11:52:19  <xorAxAx> or was it the merge?
2006-07-18T11:52:29  <xorAxAx> hmm, the merge ...
2006-07-18T11:52:35  <xorAxAx> both parents are clean
2006-07-18T11:52:47  <xorAxAx> and i used only kdiff3 ...
2006-07-18T11:53:42  <xorAxAx> i will try to remerge
2006-07-18T11:56:50  <xorAxAx> ThomasWaldmann: ah!
2006-07-18T11:56:54  <xorAxAx> ThomasWaldmann: it were your whitespace changed
2006-07-18T11:57:01  <xorAxAx> changes
2006-07-18T11:57:20  <xorAxAx> ThomasWaldmann: do you want to remerge that stuff?
2006-07-18T11:58:12  <xorAxAx> hmm, besides them, it is just the broken encoding
2006-07-18T11:59:48  <xorAxAx> pushed an ü
2006-07-18T12:03:04  <ThomasWaldmann> but my commit was ok, it dropped the ü at your merge!?
2006-07-18T12:04:25  <ThomasWaldmann> wikiutil has same problem
2006-07-18T12:08:16  <xorAxAx> yes, kdiff3 dropped it ... :-/
2006-07-18T12:16:44  <ThomasWaldmann> yet another great american tool :)
2006-07-18T12:18:23  <Kepplar> ThomasWaldmann: sorry, nope i havent yet
2006-07-18T12:18:26  <Kepplar> im assuming a request object
2006-07-18T12:18:40  <Kepplar> but that makes it hassley to manually fire off tests
2006-07-18T12:19:07  <ThomasWaldmann> btw, i think we can lower traffic and improve speed by giving a very long expires for static stuff and
2006-07-18T12:19:30  <ThomasWaldmann> include changing of url_prefix in the upgrade docs.
2006-07-18T12:20:15  <ThomasWaldmann> Kepplar: did you use grep to find an answer to your question?
2006-07-18T12:20:34  <Kepplar> ?
2006-07-18T12:20:46  <Kepplar> i remember you mentioning it - cant remember what the question was
2006-07-18T12:20:54  <Kepplar> and i remember asking why/how grep
2006-07-18T12:20:59  <Kepplar> and not getting an answer
2006-07-18T12:21:11  <ThomasWaldmann> grep is a cmdline tool to search files
2006-07-18T12:21:30  <ThomasWaldmann> grep whatisearchfor *.py
2006-07-18T12:22:17  <Kepplar> yes i know what grep is
2006-07-18T12:22:32  <ThomasWaldmann> but you don't use it?
2006-07-18T12:22:35  <Kepplar> i didnt see its relevence with the question (not that i can currently remember what the question was)
2006-07-18T12:23:50  <ThomasWaldmann> for example, if you don't know how to make an request object, use grep 'request.*=' *.py
2006-07-18T12:24:21  <Kepplar> ....
2006-07-18T12:26:09  <Kepplar> to be perfectly honest that is completly substandard. everything should be documented, if i have to use grep to find out answers to qualative questions like that, there simply isnt enough documentation. Mainly because I Was following the instructions on how to manually iniated testing and i just randomly asked me for a request object. If i want to run tests from the command line (or python interpreter) then I shouldnt have to faff around making a request
2006-07-18T12:31:25  <Kepplar> (especially as i dont need a request objecT)
2006-07-18T12:32:28  <ThomasWaldmann> if you would just do what told, you would find out in a few minutes that you HAVE a ready to use request object when using our test framework
2006-07-18T12:33:22  <ThomasWaldmann> see test_Page.py for example
2006-07-18T12:34:23  <ThomasWaldmann> + 125 other places found by grep
2006-07-18T15:27:02  <felixw> Kepplar: When you work with source, you must expect to use the source itself as documentation.
2006-07-18T15:27:22  <felixw> ThomasWaldmann: The current situation with the request object and testing is somewhat ugly.
2006-07-18T15:27:36  <felixw> Because you have to use a custom test loader.
2006-07-18T15:27:48  <felixw> It would be a lot better to have a test class to derive from.
2006-07-18T15:28:13  <felixw> Like class MyTest(moinmoin.test.CustomTestCase): ...
2006-07-18T15:29:47  <felixw> I needed to run a test seperately (i.e. not the whole test suite) for speed reasons.
2006-07-18T15:30:05  <xorAxAx> felixw: that is possible
2006-07-18T15:30:07  <felixw> (I use very tight test/implement feedback loops, so waiting a minute for a test result is too much.)
2006-07-18T15:30:12  <felixw> How?
2006-07-18T15:30:25  <xorAxAx> there is a test runner that expects at least module names
2006-07-18T15:30:30  <felixw> I used a somewhat ugly hackaround in test_formatter.py on the doctree branch.
2006-07-18T15:30:40  <felixw> Hm...
2006-07-18T15:31:45  <felixw> Ok, I'll put that onto my to-do list.
2006-07-18T15:32:20  <felixw> It still would be nicer to just have to use the normal if __name__ == '__main__': unittest.main(), though.
2006-07-18T15:32:51  <felixw> Anyway, I shouldn't complain too loudly because at the moment I don't have the time to look into it. ;-)
2006-07-18T15:35:40  <felixw> If anyone wants to get inspiration, you can look at Docutils' DocutilsTestSupport.py module and how its CustomTestCase class is used in the test modules.
2006-07-18T17:47:16  <xorAxAx> felixw: if you come today, you might find me in the garden
2006-07-18T18:17:15  <felixw> Ok, thanks.
2006-07-18T20:27:11  <felixw> xorAxAx: Bist du noch da?
2006-07-18T20:27:20  <xorAxAx> felixw: pardon me? :)
2006-07-18T20:27:30  <felixw> Argh, should've been a msg.
2006-07-18T21:29:36  <ThomasWaldmann> moin
2006-07-18T21:34:31  <felixw> Moin. :-)
2006-07-18T22:06:16  <Kepplar> moin
2006-07-18T22:11:29  <ThomasWaldmann> if anyone has a better idea than this, feel free:
2006-07-18T22:11:50  <ThomasWaldmann> http://hg.thinkmo.de/moin/1.6?cs=70d5ae05e791
2006-07-18T22:21:37  <Kepplar> do i have to use camel cases for unit tests functions?
2006-07-18T22:21:40  <Kepplar> its so ugly?
2006-07-18T22:29:16  <ThomasWaldmann> do it like the existing tests, so you have less refactoring work at the end
2006-07-18T22:30:16  <Kepplar> camel case for functions isnt pep8 :)
2006-07-18T22:30:23  <Kepplar> well
2006-07-18T22:30:24  <Kepplar> its legacy
2006-07-18T22:48:50  <Kepplar> i dont understand ThomasWaldmann. I've looked at the tests for Page and it uses request, but hows that going to work when the test firing script thing wants you to supply one?
2006-07-18T22:56:30  <ThomasWaldmann> what's your problem?
2006-07-18T22:57:22  <Kepplar> Typical Usage
2006-07-18T22:57:22  <Kepplar> -------------
2006-07-18T22:57:22  <Kepplar> Running all test in this package::
2006-07-18T22:57:22  <Kepplar> from MoinMoin._tests import run run(request)
2006-07-18T22:57:22  <Kepplar> Running only few modules::
2006-07-18T22:57:25  <Kepplar> run(request, names=['test_this', 'test_that'])
2006-07-18T22:57:27  <Kepplar> er
2006-07-18T22:57:30  <Kepplar> hmm
2006-07-18T22:57:32  <Kepplar> im following the instructions
2006-07-18T22:58:11  <Kepplar> but from the python interpeter i dont know where to get a request from, you say its build in, ive looked at the code (Page test as you said) and see no evidence of anything helpful
2006-07-18T23:01:23  <ThomasWaldmann> if you run the test by the framework (make test), you have self.request
2006-07-18T23:01:56  <Kepplar> ah
2006-07-18T23:02:19  <Kepplar> thx
2006-07-18T23:05:59  <xorAxAx> ThomasWaldmann: yes, no last-modified is better than an incorrect one
2006-07-18T23:12:14  <ThomasWaldmann> we could know if the page has dynamic stuff, but only after sending body, when it is too late.
2006-07-18T23:12:42  <xorAxAx> yep, dirty send_page
2006-07-18T23:17:07  <Kepplar> um
2006-07-18T23:17:15  <Kepplar> i havent merged with main for a long time
2006-07-18T23:17:25  <Kepplar> but tests are failing because of some xapian test bug
2006-07-18T23:17:49  <Kepplar> tommorrow ill merge
2006-07-18T23:18:00  <Kepplar> probably take all days with all the manual changes im going to have to fix
2006-07-18T23:23:37  <felixw> Kepplar: Re PEP 8 and function names:
2006-07-18T23:23:56  <felixw> Using mixedCase *does* conform to PEP 8 (sorry to correct you).
2006-07-18T23:23:58  <felixw> "      mixedCase is allowed only in contexts where that's already the
2006-07-18T23:23:58  <felixw>       prevailing style (e.g. threading.py), to retain backwards compatibility.
2006-07-18T23:24:00  <felixw> "
2006-07-18T23:24:10  <xorAxAx> felixw: you are reading an outdated PEP8 version :)
2006-07-18T23:24:18  <xorAxAx> felixw: that was changed in late december 2005 :)
2006-07-18T23:24:38  <xorAxAx> by barry
2006-07-18T23:25:06  <felixw> xorAxAx: No, that's the most current version.
2006-07-18T23:25:14  <felixw> on http://www.python.org/dev/peps/pep-0008/ and in SVN.
2006-07-18T23:25:14  * xorAxAx checks
2006-07-18T23:26:18  <felixw> FWIW, Kepplar, you can break PEP 8 anyway if you're not in the mood of refactoring a lot of stuff:
2006-07-18T23:26:21  <felixw> "    Two good reasons to break a particular rule:
2006-07-18T23:26:28  <felixw>     (2) To be consistent with surrounding code that also breaks it (maybe for
2006-07-18T23:26:31  <felixw>         historic reasons)"
2006-07-18T23:27:04  <ThomasWaldmann> Kepplar: merging main shouldn't take you more than some minutes
2006-07-18T23:28:12  <xorAxAx> felixw: you are right

MoinMoin: MoinMoinChat/Logs/moin-dev/2006-07-18 (last edited 2007-10-29 19:08:34 by localhost)