taxonomy.test is sad

catch - November 14, 2008 - 13:16
Project:Drupal
Version:7.x-dev
Component:tests
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Very sad.

This consolidates some of the tests and cleans a lot of it up. There's still a couple of test classes to fix left in there, but this already removes a lot of cruft, makes things more maintainable, and will make it easier to clean the others up later.

AttachmentSize
i_can_no_has_horrible_test.patch16.15 KB
Testbed results
i_can_no_has_horrible_test.patchpassedPassed: 7275 passes, 0 fails, 0 exceptions a href=http://testing.drupal.org/pifr/file/1/i_can_no_has_horrible_test.patchDetailed results/a

#1

Damien Tournoud - November 14, 2008 - 13:33

"I can no has horrible test"? That sounds like me speaking English :)

Care to elaborate why you are removing the full TaxonomyVocabularyFunctionsTestCase?

Oh, and tests should comply with the Test writers guidelines.

#2

catch - November 14, 2008 - 14:01
Status:needs review» needs work

1. It's been merged into TaxonomyVocabularyTestCase() - it's possible I missed something it tests, in which case I'll happily add that back in. If you spotted something glaring please let me know.
2. I'll take a look :)

I reckon I can remove two of the other test cases and just move a little bit of each into TaxonomyTermTestCase - might try to do that later on today.

Also, taxonomy_test.test should be merged into taxonomy.test I think. So CNW.

#3

catch - November 14, 2008 - 15:46
Status:needs work» needs review

Alright, lots more cleanup. Leaving the merging of taxonomy_test.test to another issue since it'll be a big cut and paste between files, and make this one harder to review.

AttachmentSize
i_can_no_has_horrible_test_0.patch 27.06 KB
Testbed results
i_can_no_has_horrible_test_0.patchpassedPassed: 7193 passes, 0 fails, 0 exceptions a href=http://testing.drupal.org/pifr/file/1/i_can_no_has_horrible_test_0_0.patchDetailed results/a

#4

catch - November 14, 2008 - 16:17

VocabularyUnitTest instead of VocabularyTestCase

AttachmentSize
i_can_no_has_horrible_test.patch 27.06 KB
Testbed results
i_can_no_has_horrible_test.patchpassedPassed: 7235 passes, 0 fails, 0 exceptions a href=http://testing.drupal.org/pifr/file/1/i_can_no_has_horrible_test_1.patchDetailed results/a

#5

catch - November 14, 2008 - 17:40

Added a functional test for taxonomy vocabularies - Damien expressed concern in irc that the patch might reduce test coverage. Although the test is much, much shorter, I'm pretty sure we test exactly the same amount of stuff - just more concisely. It'll also make it a lot easier to add new tests, which I'll need to do with future taxonomy cleanup patches.

AttachmentSize
i_can_no_has_horrible_test.patch 28.9 KB
Testbed results
i_can_no_has_horrible_test.patchpassedPassed: 7266 passes, 0 fails, 0 exceptions a href=http://testing.drupal.org/pifr/file/1/i_can_no_has_horrible_test_2.patchDetailed results/a

#6

catch - November 15, 2008 - 10:28

Found an indentation issue, added more comprehensive tests for synonyms.

AttachmentSize
i_can_no_has_horrible_test.patch 29.57 KB

#7

Dries - November 15, 2008 - 13:07

The test coverage results for November 9, 2008 report the following:

  • modules/taxonomy/taxonomy.module: 82%
  • modules/taxonomy/taxonomy.admin.inc: 67%
  • modules/taxonomy/taxonomy.pages.inc: 51%

We could commit this patch and check back on the results in a couple of days.

#8

catch - November 15, 2008 - 17:55

@Dries, that sounds like a good plan. I can keep adding tests to this patch but I'd rather do that after the initial cleanup is committed ;)

#10

catch - November 15, 2008 - 22:44

Removed a stray space and added a missing assertion message (both via webchick in irc).

AttachmentSize
i_can_no_has_horrible_test.patch 29.64 KB
Testbed results
i_can_no_has_horrible_test.patchpassedPassed: 7229 passes, 0 fails, 0 exceptions Detailed results

#11

Dries - November 16, 2008 - 15:00

I've committed this to CVS HEAD. Thanks. Let's mark it 'code needs review' until the code coverage results have been updated?

#12

catch - November 16, 2008 - 15:53
Status:needs review» postponed (maintainer needs more info)

Thanks Dries, I'll check them in a day or so. If you don't mind, I'm going to move this to 'active (needs more info)' to move it out of the actual reviews queue (and because testing bot will mark it to CNW next time it tries to apply the patch).

#13

catch - November 18, 2008 - 22:27
Status:postponed (maintainer needs more info)» fixed

November 9th:
modules/taxonomy/taxonomy.module: 82%
modules/taxonomy/taxonomy.admin.inc: 67%
modules/taxonomy/taxonomy.pages.inc: 51%

November 17th:
modules/taxonomy/taxonomy.module: 81%
modules/taxonomy/taxonomy.admin.inc: 66%
modules/taxonomy/taxonomy.pages.inc: 51%

So seems like we lost 1% coverage from taxonomy.module and taxonomy.admin.inc from the 260 lines of code that were removed. Since there wasn't a big regression, I'm marking this back to fixed. We should get more than that 2% back from #293506: TestingParty08: vocabulary overview + deletion and #336084: Add tests for terms on node preview, so see everyone over there. Not too shabby :)

#14

System Message - December 2, 2008 - 22:56
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.