Skip to content

Fixed #18927 - Fix bulk_create tests when not has_bulk_insert #350

Closed
wants to merge 2 commits into from

3 participants

@manfre
manfre commented Sep 7, 2012

Skipped some tests when not has_bulk_insert and others only skip the asserts that depend on the explicit number of queries.

@alex
Django member
alex commented Sep 7, 2012

This is not the correct fix, all tests should be split into two tests, one which checks efficiency, and the other which checks correctness. The efficiency version should be only run on databases which support bulk insert.

@manfre
manfre commented Sep 7, 2012

What is the benefit of doing this split instead of skipping invalid inserts? Wouldn't it be better to not duplicate most of the code and time for some tests only to check another assert for some databases?

@alex
Django member
alex commented Sep 7, 2012

The benefit is that we have two tests for two different things which can then fail independently, and give us more information for when they break, which is the goal of a test suite.

@manfre
manfre commented Sep 28, 2012

Updated the pull request to split the efficiency tests.

@akaariai
Django member
akaariai commented Oct 9, 2012

Committed manually.

@akaariai akaariai closed this Oct 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.