Re: Test reordering and TransactionTestCase cleanup

2012-07-21 Thread Ramiro Morales
On Thu, Jul 19, 2012 at 8:32 PM, Ramiro Morales wrote: >> I ran the full test suite on SQLite, and got this error: >> == >> ERROR: test_pass_connection_between_threads >> (regressiontests.backends.tests.ThreadTests) >> ---

Re: Test reordering and TransactionTestCase cleanup

2012-07-19 Thread Ramiro Morales
Anssi, Thanks for the review, On Tue, Jul 10, 2012 at 2:16 AM, Anssi Kääriäinen wrote: > > I spotted one error: > https://github.com/ramiro/django/compare/pr45_t18271#L7R472 - The > line should say conn.cursor(), not connection.cursor(). Fixed in the last iteration of the branch. > > I ran t

Re: Test reordering and TransactionTestCase cleanup

2012-07-09 Thread Anssi Kääriäinen
On 10 heinä, 00:35, Ramiro Morales wrote: > On Mon, May 7, 2012 at 6:50 PM, Anssi Kääriäinen > > wrote: > > > I would like to just get rid of the sequence resets. Oracle doesn't do > > it currently, TestCase doesn't do it, and IMO assuming the IDs are > > going to start from 1 is an assumption on

Re: Test reordering and TransactionTestCase cleanup

2012-07-09 Thread Ramiro Morales
On Mon, May 7, 2012 at 6:50 PM, Anssi Kääriäinen wrote: > > I would like to just get rid of the sequence resets. Oracle doesn't do > it currently, TestCase doesn't do it, and IMO assuming the IDs are > going to start from 1 is an assumption one should not make. > > Objections to just getting rid o

Re: Test reordering and TransactionTestCase cleanup

2012-05-08 Thread Łukasz Rekucki
On 8 May 2012 14:22, Karen Tracey wrote: > On Mon, May 7, 2012 at 5:50 PM, Anssi Kääriäinen > wrote: >> >> I would like to just get rid of the sequence resets. Oracle doesn't do >> it currently, TestCase doesn't do it, and IMO assuming the IDs are >> going to start from 1 is an assumption one sho

Re: Test reordering and TransactionTestCase cleanup

2012-05-08 Thread Karen Tracey
On Mon, May 7, 2012 at 5:50 PM, Anssi Kääriäinen wrote: > I would like to just get rid of the sequence resets. Oracle doesn't do > it currently, TestCase doesn't do it, and IMO assuming the IDs are > going to start from 1 is an assumption one should not make. > > Objections to just getting rid of

Re: Test reordering and TransactionTestCase cleanup

2012-05-08 Thread Anssi Kääriäinen
On May 8, 12:50 am, Anssi Kääriäinen wrote: > On May 5, 4:31 pm, Andreas Pelme wrote: > > > > > > > > > > > > On May 4, 2:30 pm, Karen Tracey http://gmail.com)> > > > wrote: > > > Thanks for the link. While reading the previous threads I spotted at > > > one blocker issue: the first TransactionT

Re: Test reordering and TransactionTestCase cleanup

2012-05-07 Thread Anssi Kääriäinen
On May 5, 4:31 pm, Andreas Pelme wrote: > > On May 4, 2:30 pm, Karen Tracey http://gmail.com)> > > wrote: > > Thanks for the link. While reading the previous threads I spotted at > > one blocker issue: the first TransactionTestCase will not start with > > zeroed database sequence values. To preve

Re: Test reordering and TransactionTestCase cleanup

2012-05-05 Thread Andreas Pelme
On Saturday 5 May 2012 at 00:39, Anssi Kääriäinen wrote: > On May 4, 2:30 pm, Karen Tracey http://gmail.com)> wrote: > Thanks for the link. While reading the previous threads I spotted at > one blocker issue: the first TransactionTestCase will not start with > zeroed database sequence values. To pr

Re: Test reordering and TransactionTestCase cleanup

2012-05-05 Thread Andreas Pelme
On Friday 4 May 2012 at 13:30, Karen Tracey wrote: > On Fri, May 4, 2012 at 4:46 AM, Andreas Pelme (mailto:andr...@pelme.se)> wrote: > > > > That's a good question. Anyone who wrote to original > > TransactionTestCase/reordering implementation that wants to chime in? :-) > > I worked on the tes

Re: Test reordering and TransactionTestCase cleanup

2012-05-04 Thread Anssi Kääriäinen
On May 4, 2:30 pm, Karen Tracey wrote: > On Fri, May 4, 2012 at 4:46 AM, Andreas Pelme wrote: > > > That's a good question. Anyone who wrote to original > > TransactionTestCase/reordering implementation that wants to chime in? :-) > > I worked on the test speedups that introduced TransactionTest

Re: Test reordering and TransactionTestCase cleanup

2012-05-04 Thread Karen Tracey
On Fri, May 4, 2012 at 4:46 AM, Andreas Pelme wrote: > > That's a good question. Anyone who wrote to original > TransactionTestCase/reordering implementation that wants to chime in? :-) I worked on the test speedups that introduced TransactionTestCase and I added the re-ordering, but the behavio

Re: Test reordering and TransactionTestCase cleanup

2012-05-04 Thread Andreas Pelme
Anssi, thanks a lot for the detailed feedback, it is much appreciated! My comments are inlined below: On Friday 4 May 2012 at 10:03, Anssi Kääriäinen wrote: > I marked the ticket DDN, there are three reasons: > 1. If a test case screws up cleanup it will cause problems for > itself currently, a

Re: Test reordering and TransactionTestCase cleanup

2012-05-04 Thread Anssi Kääriäinen
On May 4, 10:09 am, Andreas Pelme wrote: > Here's the ticket: > > https://code.djangoproject.com/ticket/18271 > > … and an initial patch: > > https://github.com/django/django/pull/45 I marked the ticket DDN, there are three reasons: 1. If a test case screws up cleanup it will cause problems f

Re: Test reordering and TransactionTestCase cleanup

2012-05-04 Thread Andreas Pelme
On Thursday 3 May 2012 at 19:23, Anssi Kääriäinen wrote: > On May 3, 7:29 pm, Andreas Pelme http://pelme.se)> wrote: > > I am trying to run my Django test suite with an alternative test runner > > (py.test), and found some issues with test isolation. > > > > TransactionTestCase does currently no

Re: Test reordering and TransactionTestCase cleanup

2012-05-04 Thread Andreas Pelme
On Thursday 3 May 2012 at 22:14, Ramiro Morales wrote: > On Thu, May 3, 2012 at 1:29 PM, Andreas Pelme (mailto:andr...@pelme.se)> wrote: > > I am trying to run my Django test suite with an alternative test runner > > (py.test), and found some issues with test isolation. > > > > TransactionTestCa

Re: Test reordering and TransactionTestCase cleanup

2012-05-03 Thread Andreas Pelme
On Thursday 3 May 2012 at 21:17, Karen Tracey wrote: > On Thu, May 3, 2012 at 12:29 PM, Andreas Pelme (mailto:andr...@pelme.se)> wrote: > > > > Djangos default testrunner reorders the test suite to run all TestCase > > tests before TransactionTestCases, which avoids this problem. I cannot find

Re: Test reordering and TransactionTestCase cleanup

2012-05-03 Thread Ramiro Morales
On Thu, May 3, 2012 at 1:29 PM, Andreas Pelme wrote: > I am trying to run my Django test suite with an alternative test runner > (py.test), and found some issues with test isolation. > > TransactionTestCase does currently not clean up after itself (i.e. flush the > database), but instead assumes

Re: Test reordering and TransactionTestCase cleanup

2012-05-03 Thread Karen Tracey
On Thu, May 3, 2012 at 12:29 PM, Andreas Pelme wrote: > > Djangos default testrunner reorders the test suite to run all TestCase tests > before TransactionTestCases, which avoids this problem. I cannot find this > reordering documented anywhere, It is documented: https://docs.djangoproject.com/

Re: Test reordering and TransactionTestCase cleanup

2012-05-03 Thread Anssi Kääriäinen
On May 3, 7:29 pm, Andreas Pelme wrote: > I am trying to run my Django test suite with an alternative test runner > (py.test), and found some issues with test isolation. > > TransactionTestCase does currently not clean up after itself (i.e. flush the > database), but instead assumes that the nex