Test reordering and TransactionTestCase cleanup

2012-05-03 Thread Andreas Pelme
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 next test will flush the database. It is generally a

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 thi

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 w

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. > > > > Tran

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-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

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: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-01 Thread Andreas Pelme
Hi, > On 30 apr 2015, at 18:42, Carl Meyer wrote: > > transaction-hooks is actually fairly small and understandable too. And I > don't think it's hard to use for this situation, either; you'd just need > to use `connection.on_commit` in your signal handler if you wanted to > delay some action un

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-03 Thread Andreas Pelme
> On 3 maj 2015, at 15:44, Christopher Adams > wrote: > > So unless anyone has objections, I'm going to put my branch on hold for now. > If anyone still wants me to see if there's a way it can work I'm willing to > give it a bit more work, however I think it should probably be passed over >

Re: Attach a technincal html response to email on server error

2011-11-10 Thread Andreas Pelme
On 10 nov 2011, at 22:03, Ric wrote: > hi, i receive django email on 500 error. > > with that kind of mail is difficult to debug, because i don't have a > lot of informations. > > it's much more simple to debug when i set DEBUG = True and i receive > an html technical response. > with that respon

Model fields in localflavor

2008-10-04 Thread Andreas Pelme
[This messages is related to http://groups.google.com/group/django-developers/browse_thread/thread/64e4d42590145347 ] On Jul 27, 11:39 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-07-27 at 16:39 +0200, Andreas Pelme wrote: > > Hello > > > I have sta

Swedish localflavor

2009-02-01 Thread Andreas Pelme
without any issues. Is there any chance we could get this into 1.1? What is currently keeping it from not being committed to trunk? If there is something I can do to help getting it into trunk, please let me know. Best regards Andreas Pelme [1] http://code.djangoproject.com/ticket/9289 [2] http

Re: App-loading reloaded - running code at startup

2013-12-30 Thread Andreas Pelme
itialised state would be very very useful in situations like this, and would have saved us many hours of confusion. -- Andreas Pelme -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop recei

Re: Feature request: post/pre commit/rollback signals

2014-01-10 Thread Andreas Pelme
can take care of making the issue + pull-request. > > Greetings. > Jesus. Hi, This is a tricky issue that has been discussed earlier, you will probably want to check out ticket #14051: https://code.djangoproject.com/ticket/14051 — Andreas Pelme -- You received this message becaus

Re: [GSOC] Shifting to Py.Test and Improving the Test Suite

2014-04-07 Thread Andreas Pelme
Hi Chris, It looks like you invoke nosetests and not py.test, therefore you do not get the results one would expect with py.test: On 7 apr 2014, at 11:52, Chris Wilson wrote: > OK, here is one. > > chris@lap-x201:~/projects/2014/webassets$ .ve/bin/tox -e py27 -- > tests.test_filters:TestPyScs

Pluggable secret key backend

2018-11-10 Thread Andreas Pelme
Hi, settings.SECRET_KEY can be used for sessions, password resets, form wizards and other cryptographic signatures via the signing APIs. Changing SECRET_KEY means that all of those will be invalidated and the users will be affected in weird ways without really knowing what happened. (Why am I logg

Re: Pluggable secret key backend

2018-11-10 Thread Andreas Pelme
> On 10 Nov 2018, at 13:00, ludovic coues wrote: > > I don't see how this would work. > > For example the session. You take the user cookie. You try to validate with > your secret key. That doesn't work because the current key is the new one. > > With a custom cookie backend, you could chec

Re: Pluggable secret key backend

2018-11-10 Thread Andreas Pelme
On 10 Nov 2018, at 13:29, Adam Johnson wrote: > > Hi Andreas > > I like your proposal, moving to a backend is an elegant way of solving both > the immediate problem and opening up the other possibilities you mentioned. Thanks Adam, I am glad you like the proposal. :) > I think it would also b

Re: django.utils.dateparse

2019-02-04 Thread Andreas Pelme
On 4 Feb 2019, at 15:04, Giuseppe De Marco wrote: > > python3 -m timeit -s "import sys, os; sys.path.append(os.getcwd()); from > datetime_heuristic_parser import datetime_heuristic_parser; > print(datetime_heuristic_parser('04/12/2018 09:7:4Z'))" That command is not correct. timeit -s takes

Re: Discussion related to ticket #26822 (new migrations, --keepdb and --parallel option)

2016-07-04 Thread Andreas Pelme
Hello, > On 5 juli 2016, at 00:22, Romain Garrigues > wrote: > After some investigation, I have seen that, in case of keepdb context, in > django/db/backends/*/creation.py, if the cloned databases already exist, we > don't touch them, which leads to this new field not created in cloned ones. >