Unit tests
|
fedak
![]()
Joined: 2003-12-14
Posts: 79 |
Posted: Thu, 2004-02-19 04:40
|
|
Getting 5 failing unit tests with last night's dev cut: core adminlayoutscontrollertest testactivate FAIL 0.0224 The unit test result page has been saved off here: http://www.fedak.net/g2_unit.htm |
|


Posts: 7985
Ah ha! This turned out to only be an issue on Windows. Thanks for bringing it to my attention -- I just committed a fix for it.
Posts: 79
Yup, looks like the adminlayoutscontrollertest layouts are now working.
mindless, the slideshow test still seems to be failing...
-fedak
Posts: 7985
I was unable to get the unit tests to fail on my box -- are they still failing for you now, fedak? If so, what platform are you on? Thanks.
Posts: 79
Windows.
I should have some time over the weekend to poke around with it a little deeper if its not something you're able to recreate.
-fedak
Posts: 79
Tracked this down, Looks like the root cause was not having the ImageMagick module activated.
Probably should be a check for this in the slideshow test, but there doesn't appear to be an issue with the slideshow code itself.
All the test cases are now passing again with the latest dev build...
-fedak
Posts: 7985
The slideshow test should be modified so that it uses a mock graphics utility that can handle the derivative operations that it's depending on. This will free it from dependencies on any of the real graphics toolkits and speed up the test considerably.
Posts: 8601
I've added that to my list.
Posts: 7985
FYI, I encountered the same problem with the PhotoAccessCartPlugin test, since it requires the existence of thumbnails and derivatives, but shouldn't really be doing any graphics operations on them (since all it really needs to do is verify that we've passed the right data to the mock PhotoAccess server). Check out what I did in the setUp method there -- I forced the entity class to be a GalleryPhotoItem but used a bogus mime type so that none of the graphics toolkits would work with it -- this basically allows us to skate by without invoking a toolkit without breaking the rules.
Posts: 79
Did someone forget to check in modules\core\test\data\apo'strophe.jpg?
Seems to be causing the "core itemaddfromservertest testaddchildrenfromlocalserver" unit test to fail in last night's build.
Posts: 7985
Ah, this is a problem with paths in the unit test code. That file doesn't exist -- we have a dummy toolkit that is designed to expect a request for a file with that name and fulfil it. This lets us test weirdly named files in the ItemAdd code without actually having to ship all kinds of weird files with the code. The bug was yet another slash-or-backslash issue on Windows .. I just commmitted a fix for it now.