Re: Running django tests with postgres

2018-09-18 Thread Mike Dewhirst
Bill I'm about to disappear for a few days. Thank you very much for your suggestions - I'll tackle them when I get back. Cheers Mike On 18/09/2018 11:34 PM, Bill-Torcaso-Oxfam wrote: I two comments, and as always Your Milage May Vary. * I wonder if you have the right indexes on your

Re: Running django tests with postgres

2018-09-18 Thread Bill-Torcaso-Oxfam
I two comments, and as always Your Milage May Vary. - I wonder if you have the right indexes on your Postgres database? The previous people report much faster completion times for test that use Postgres as the database. Perhaps your domain is just hard (and you description makes

Re: Running django tests with postgres

2018-09-16 Thread Mike Dewhirst
My software classifies chemical hazards according to intrinsic physical properties. This requires accessing large quantities of reference data imported from jurisdictions around the world. The tests demand correct classification for known properties. There are dozens of different

Re: Running django tests with postgres

2018-09-15 Thread Jason
Agreed. Something is definitely off. At work, the legacy monolith django app has about 7800 tests. It takes about 18 minutes to run the full test suite in docker with the latest MBP (four cores, 5GB RAM allocated in docker machine), including creating the db and four parallel test streams

Re: Running django tests with postgres

2018-09-15 Thread Andréas Kühne
I would just be scared that some minor issues are different between the database implementations - therefore some test that would work in the tests and during development, doesn't work in production. I usually try to use the same things in production and development (or as close as possible).

Re: Running django tests with postgres

2018-09-14 Thread Mike Dewhirst
+1 Andréas One of my projects runs (currently) 1,248 tests using SQLite3 in 72 minutes on my local Windows 10 dev laptop. That laptop has both a SSD and a hard disk. Foolishly I opted to use the SSD for software installations and the hard disk for development and thus the tests. I was

Re: Running django tests with postgres

2018-09-14 Thread Andréas Kühne
Hi, Just my 5 cents. I think you are doing the tests wrong. I don't believe that doing testing against hard coded values is at all correct - and it isn't actually that hard to change the tests to a simpler way. The values of the PK's aren't really necessary for your test to be true either - how

Running django tests with postgres

2018-09-14 Thread Hezi Halpert
I would like to share with you an issue we encounter while moving from sqlite to postgres with heavily use of Django testing. We have Django app with ~700 tests. Most of them accessing database. We recently migrated the database from sqlite to postgres. Many of our tests were written in a way

Re: Running Django tests for postgres_tests

2016-07-20 Thread Tim Graham
You need to use a custom settings module that uses the postgresql database backend. https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#using-another-settings-module On Tuesday, July 19, 2016 at 11:37:35 PM UTC-4, premdjango wrote: > > I'm trying to run django

Running Django tests for postgres_tests

2016-07-19 Thread premdjango
I'm trying to run django tests for a particular module - postgres_tests. The tests runs but it says it skipped=312 tests, I believe none of the test case run. How do I fix this issue? (djangodev) Anands-MBP:tests laks$ ./runtests.py postgres_tests Testing against Django installed in

InterfaceError: connection already closed from psycopg2 when running Django Tests

2015-08-11 Thread TheBeardedTemplar
I'm trying to implement testing on a fairly large Django site, and I'm encountering a psycopg2 error when running all the tests at once using `python manage.py test`. If I specify each app name individually, it works fine (some tests fail, but all for legitimate reasons), however when I run

Re: Running Django tests from Python

2011-04-27 Thread Shawn Milochik
On 04/27/2011 04:06 PM, Kenny Meyer wrote: Hi Shawn, http://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code Does this answer your question? Kenny Never mind. More pdb action and I figured out that I had overwritten DJANGO_SETTINGS_MODULE at the

Re: Running Django tests from Python

2011-04-27 Thread Shawn Milochik
On 04/27/2011 04:06 PM, Kenny Meyer wrote: Hi Shawn, http://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code Does this answer your question? Kenny Kenny, This is *exactly* what I was looking for. Unfortunately it doesn't work. It keeps saying that

Re: Running Django tests from Python

2011-04-27 Thread Kenny Meyer
Hi Shawn, http://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code Does this answer your question? Kenny On Wed, Apr 27, 2011 at 12:41 PM, Shawn Milochik wrote: > Sorry, I realize that last post is missing the context of the

Re: Running Django tests from Python

2011-04-27 Thread Shawn Milochik
Sorry, I realize that last post is missing the context of the original question. Please see this: https://groups.google.com/d/topic/django-users/-4f3J1bJ10k/discussion Thanks, Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Running Django tests from Python

2011-04-27 Thread Shawn Milochik
I figure it's been long enough that I can bump this post. I'm currently using subprocess to do this. There must be an easy way to simply invoke the tests from within Python. So, how do you (within Python), do the equivalent of the following?: ./manage.py test myapp1, myapp2, myapp3 Thanks,

Running Django tests from Python

2011-04-21 Thread Shawn Milochik
I want to use pyinotify[1] to monitor my project directory and run my unit tests whenever I save a .py file. The monitoring part is working. All I need now is to know how to call the tests from my "watcher" script. As noted in the docs[2], I'm already running setup_test_environment() in my

Re: Running django tests

2009-08-10 Thread Filip Gruszczyński
Indeed it helped. Thanks a lot, Karen. 2009/8/10 Karen Tracey : > 2009/8/10 Filip Gruszczyński >> >> Hi! >> >> I would like to run django source code tests, but as soon as I do it >> (after specifying the settings file), I get all kinds of exceptions. >>

Re: Running django tests

2009-08-10 Thread Karen Tracey
2009/8/10 Filip Gruszczyński > > Hi! > > I would like to run django source code tests, but as soon as I do it > (after specifying the settings file), I get all kinds of exceptions. > Any idea, what am I doing wrong? I post the exceptions below. > >

Running django tests

2009-08-10 Thread Filip Gruszczyński
Hi! I would like to run django source code tests, but as soon as I do it (after specifying the settings file), I get all kinds of exceptions. Any idea, what am I doing wrong? I post the exceptions below. grusz...@gruszczy-laptop:~/django/tests# PYTHONPATH=..