[wxPython-dev] SoC Unit Test Status
Kevin Ollivier
kevino at theolliviers.com
Wed Jul 11 09:58:32 PDT 2007
Hi Frank,
Thanks again for all your hard work on the project! I think that we
should go ahead and discuss the client and virtual size failures. For
those who haven't read through Frank's wiki page, the direct link to
the test results is here:
http://wiki.wxpython.org/Test_Suite_Results
First off, I wanted to point out to people that we run wx.Window
method tests on all wx.Window subclasses, so that we can catch any
inconsistencies between base methods and overridden implementations
of base class methods in subclasses. So while the number of failures
is rather large, many of those are failures trace back to failures in
the base wx.Window methods here.
Looking at the test failures, I think a number of them are due to
ambiguities, as Frank mentioned. For the ClientRect failure, my guess
is that the client rect is adding the control's border to the x and y
positions. Or perhaps it's giving it's x,y relative to the parent?
Also, will GetClientSize always return a value >= the MinSize?
As for the virtual size failures, I suspect the issue is that
SetVirtualSize doesn't allow the virtual size to go below the
control's current size? Is that correct? It makes sense, but if so,
we should update the tests and the documentation to reflect that.
Also, Robin, the Get/SetVirtualSizeWH APIs just convert tuples into
wx.Size (and vice-versa) then call the wx.Size version of the method,
right? If so, maybe a test that ensures GetVirtualSizeWH returns the
same value as GetVirtualSize would be sufficient.
One last question for Frank. I noticed you have an assert for missing
wx.Slider.GetRange(). AFAICT, that function is not part of the
wx.Slider API. It probably SHOULD be, as we have SetRange(min, max),
but right now you get the values by calling GetMin() and GetMax(). It
was probably done this way because in C++ returning two values is
difficult and they didn't want to use wx.Size or wx.Point for it, so
they just stuck with the GetMin/GetMax functions.
Thanks,
Kevin
On Jul 11, 2007, at 9:02 AM, Frank Tobia wrote:
> Hi all,
>
> Now that the Unit Test SoC project has results to show, I wanted to
> inform the community and solicit feedback.
>
> You can get the latest copy of the test suite from SVN by running:
> svn checkout https://svn.wxwidgets.org/svn/wx/wxPython/branches/
> SOC2007_UNITTEST/tests/unittest unittest
>
> From there, 'runAllTests.py' runs the whole test suite with default
> options, or use 'runAllTests.py --help' to check out the various
> options for configuration and data output.
>
> I've updated the project page on the wxPyWiki, which is available
> at http://wiki.wxpython.org/GUI_Unit_Testing_Project
> That should explain most of the unit test suite; be sure to leave
> comments or email me with questions if I omitted anything.
>
> I'm going to need community support if this project is going to
> succeed. In effect, unit tests are executable documentation: both
> communicate the software's expected behavior to developers and
> users, with unit tests being able to check the code's adherence.
> In writing unit tests, I've found a lot of ambiguity and lack of
> documentation showing the expected behavior of many different
> classes and methods. Going forward, I plan on singling out these
> cases, in order to clarify what the code should do. I expect that,
> when these important questions and issues arise, the community will
> reach a consensus about what the code should do, and then it can be
> codified in the form of a test.
>
> The goals here are to improve code quality, reduce bugs, clear up
> cross-platform issues, improve documentation. The major focus, of
> course, is on improving the user experience (and making development
> more enjoyable :). I'm looking forward to your feedback.
>
> -Frank
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-dev/attachments/20070711/6b407715/attachment.htm
More information about the wxpython-dev
mailing list