[TIP] oejskit + plain unittest Re: ANN: oejskit 0.8.5 JavaScript in-browser testing and utility kit with py.test plugin
Samuele Pedroni
pedronis at openend.se
Tue Jul 28 10:13:12 PDT 2009
Samuele Pedroni wrote:
>
> Notice that in this latest incarnation of the infrastructure all the
> entangling with py.test lives in the plugin,
> I expect the rest of the code to be reusable after possibly some tweaks
> with other testing drivers getting more or less features depending on
> the latter capabilities and the design of the integration, the tricky
> bit of the exercise is probably going to be resource management and
> how/where to get configuration from. I had some discussion at europython
> about whether indeed reusing things with unittest would be possible.
>
> I would consider patches/addtions in those directions.
>
I have checked in myself some plain stdlib unittest + oejskit
integration, an usage example that just repeats
some of the py.test scenarios is here:
http://bitbucket.org/pedronis/js-infrastructure/src/tip/test/unittests.py
the integration code is all in:
http://bitbucket.org/pedronis/js-infrastructure/src/tip/oejskit/unittest_support.py
I don't use plain unittest much at all, so I don't know if this is
idiomatic enough. Feedback and improvements are welcome. It basically
defines a JavaScript specific suite that can be subclassed to add
configuration info that would go in conftest in py.test, also as for
py.test tests are run against all specified browser kinds, either given
as a parameter to the suite or inferred from the js file name.
Samuele
PS: I'm going to be mostly off-line until Monday
More information about the testing-in-python
mailing list