setUp is not called per method

chx - July 2, 2008 - 06:16
Project:Drupal
Version:7.x-dev
Component:tests
Category:bug report
Priority:critical
Assigned:chx
Status:closed
Description

I was convinced on IRC that we need the old way of running setUp and tearDown for each method instead of each test class. That's why they exist in the first place. And this is how old testing lib worked.

AttachmentSize
setuppermethod.patch838 bytes

#1

R.Muilwijk - July 2, 2008 - 06:20

+1 for this patch. For all the methods for example in cache tests I had to add a resetter function.

#2

Crell - July 2, 2008 - 06:26
Status:patch (code needs review)» patch (reviewed & tested by the community)

I can confirm the bug (I'm the one who growled at chx about it in IRC after the database tests broke for the 47th time :-) ) and that this patch fixes it.

#3

catch - July 2, 2008 - 09:48

running all tests is fine too.

#4

Dries - July 2, 2008 - 19:35
Status:patch (reviewed & tested by the community)» fixed

Ran all tests before and after and the tests continued to work. Committed to CVS HEAD.

#5

yched - July 3, 2008 - 07:33

Not sure where simpletest D6 lies on this regard ? Does this need backporting ?

#6

boombatower - July 3, 2008 - 08:17

It was never changed so it still works this way, although there are a number of things that would be helpful back-porting. Already open issue #274542: Back-port the batch API patch & related imporvements.

#7

Anonymous (not verified) - July 23, 2008 - 10:56
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.