Glad to hear it, sorry I wasn't more help. On Fri, Apr 15, 2016 at 10:49 AM, <[email protected]> wrote:
> Hey John, > cool it runs now. > I had multiple problems: > > 1.) I granted ALL rights to my user on the test DB. > ==> This solved the issue with the TransactionManagementError. > > 2.) I had to do some changes in my configuration and play around. > Afterwards the tests were running. But not all green :-| > > Thanks for your help > Have a nice weekend > schaf > > Am Freitag, 15. April 2016 16:08:21 UTC+2 schrieb [email protected]: >> >> No I have not added a target. The reason is that there is a class >> deriving from NoseTestSuiteRunner. >> This class defines the run_tests function which modifies the test_labels >> passed to the base 'constructor'. >> If I add a Target for a single test (testclass.testMethod) then just this >> test method would be called, but if I start the debugger, I get the same >> error, before I run into the setUp or the specific test function. So I do >> not get to that point. >> Also the 'empty test suite' confuses me. because I have tests, just not >> in a subdirectory of each app, but in a separate tests directory. >> >> >> >> >> >> >> Am Freitag, 15. April 2016 15:52:13 UTC+2 schrieb John Griebel: >>> >>> The next step (for me at least) would be to start removing/commenting >>> out things from the tests file until you stop getting the error. Hopefully >>> that will tell you what statement(s) may be causing the problem. Although I >>> fear you may be correct in thinking this is a configuration issue. >>> >>> Have you tried adding a Target? Does the app itself run without this >>> error? >>> >>> On Fri, Apr 15, 2016 at 9:29 AM, <[email protected]> wrote: >>> >>>> Hi John, >>>> I did now comment out those two files, but still get the same error. >>>> Maybe I have a wrong configuration or so. I'm quite new in Django / >>>> Python. >>>> >>>> Regards >>>> schaf >>>> >>>> Am Freitag, 15. April 2016 15:11:40 UTC+2 schrieb John Griebel: >>>>> >>>>> That's what I would try. >>>>> >>>>> On Fri, Apr 15, 2016 at 9:02 AM, <[email protected]> wrote: >>>>> >>>>>> Hi John, >>>>>> thanks, but I did already check for @transaction.commit_manually in >>>>>> the code, but PyCHarm serahc just finds this in the >>>>>> virtualenv/python2.7/site-packages/django_extensions/management/commands. >>>>>> So in my code there is nothing, would you recommend to comment those out, >>>>>> even if it is not from my code just to see whats going on? >>>>>> >>>>>> Thanks >>>>>> schaf >>>>>> >>>>>> Am Freitag, 15. April 2016 14:18:21 UTC+2 schrieb John Griebel: >>>>>>> >>>>>>> If you have methods using the @transaction.commit_manually >>>>>>> decorator, comment those out temporarily. You should get a more helpful >>>>>>> error message after doing so. >>>>>>> >>>>>>> On Fri, Apr 15, 2016 at 4:44 AM, <[email protected]> wrote: >>>>>>> >>>>>>>> Hi All, >>>>>>>> I took over some projects written with Python 2.7 / Django 1.5.1. >>>>>>>> For unit tests the django-nose 1.2 (nose 1.3.3) is used and the >>>>>>>> project structure has its own tests directory which contains the >>>>>>>> testrunner.py. >>>>>>>> As a development environment I use PyCharm. >>>>>>>> As I wanted to run the unit tests I created a new run/debug >>>>>>>> configuration. >>>>>>>> I did not add any Target. Just the Environment variable for >>>>>>>> DJANGO_SETTINGS_MODULE and a working directory. >>>>>>>> >>>>>>>> But when I run/debug the tests, I always get a >>>>>>>> 'TransactionManagementError: Transaction managed block ended with >>>>>>>> pending >>>>>>>> COMMIT/ROLLBACK >>>>>>>> It also say that no tests were found but the test DB was created. >>>>>>>> Do you have any hints? >>>>>>>> >>>>>>>> Connected to pydev debugger (build 141.1899) >>>>>>>> /home/schaf/workspace/Solution/env/bin/python /home/schaf/ >>>>>>>> Schreibtisch/pycharm-4.5.3/helpers/pydev/pydevd.py --multiproc --client >>>>>>>> 127.0.0.1 --port 60525 --file /home/schaf/Schreibtisch/pycharm-4.5. >>>>>>>> 3/helpers/pycharm/django_test_manage.py test /home/schaf/workspace/ >>>>>>>> Solution >>>>>>>> Testing started at 10:24 ... >>>>>>>> pydev debugger: process 5727 is connecting >>>>>>>> >>>>>>>> nosetests tests.testUrlAnalyzer --with-coverage --cover-html -- >>>>>>>> cover-html-dir=./tests/coverage --cover-erase --cover-package= >>>>>>>> UrlAnalyzer --verbosity=1 >>>>>>>> Creating test database for alias 'default'... >>>>>>>> TransactionManagementError: Transaction managed block ended with >>>>>>>> pending COMMIT/ROLLBACK >>>>>>>> >>>>>>>> Process finished with exit code 1 >>>>>>>> Empty test suite. >>>>>>>> >>>>>>>> >>>>>>>> Thanks >>>>>>>> schaf >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Django users" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> To post to this group, send email to [email protected]. >>>>>>>> Visit this group at https://groups.google.com/group/django-users. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/django-users/ca1ca36f-0e7a-4da4-8f69-cc5c4b29a7c7%40googlegroups.com >>>>>>>> <https://groups.google.com/d/msgid/django-users/ca1ca36f-0e7a-4da4-8f69-cc5c4b29a7c7%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Django users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>>> Visit this group at https://groups.google.com/group/django-users. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/django-users/47dd5892-9461-4ea1-b0df-ddb9cd5b88be%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/django-users/47dd5892-9461-4ea1-b0df-ddb9cd5b88be%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/django-users. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/ccb2a56a-3d6e-4036-adf2-b3efed46c319%40googlegroups.com >>>> <https://groups.google.com/d/msgid/django-users/ccb2a56a-3d6e-4036-adf2-b3efed46c319%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/5a8a79f3-0d5e-432b-90c5-9aa1ed3a5546%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/5a8a79f3-0d5e-432b-90c5-9aa1ed3a5546%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOK12WYY2Rumo7ZktdwLZ21cRjYaRfni2KJUR0%3DB2%3Dn6RW3YmQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

