Re: [patch] change --pkg behavior

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Atira Odhner <aodhner(at)pivotal(dot)io>
Cc: George Gelashvili <ggelashvili(at)pivotal(dot)io>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [patch] change --pkg behavior
Date: 2017-02-09 12:16:48
Message-ID: CA+OCxozVtfbCg4AykgdYCtZ2Ap6=Da=4g2qzz50+hF6LonvgBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Wed, Feb 8, 2017 at 9:37 PM, Atira Odhner <aodhner(at)pivotal(dot)io> wrote:
> Here is the additional patch to exclude one or more packages.
>
> On Tue, Feb 7, 2017 at 6:02 PM, George Gelashvili <ggelashvili(at)pivotal(dot)io>
> wrote:
>>
>> Hello Hackers,
>>
>> To chase down a set of tests that were failing together, we wanted to run
>> deeper trees of tests. We changed the behavior of the --pkg argument to
>> runtests.py so it runs tests under a package and its subpackages, instead of
>> for a single node.
>>
>> It gave us more flexibility in what tests to run. This complements the
>> --exclude behavior we are working on.
>>
>> To run tests for a single node, ".tests" can be appended to the package
>> path (see changes to README)
>>
>> George & Tira

This seems to be broken with Python 3.4 which is what I happened to
test with first. With just the first patch, the examples:

python runtests.py --pkg browser

python runtests.py --pkg browser.server_groups.servers.databases

appear to cause all tests to run, but most fail with:

ERROR: runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
This function will fetch added database. (Check Databases Node URL)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_get.py",
line 27, in runTest
server_data = parent_node_dict["database"][-1]
IndexError: list index out of range

I added the second patch as well, in case it fixed the original bug,
and now all tests fail with:

(pgadmin4-py34) piranha:regression dpage$ python runtests.py --pkg browser.tests
pgAdmin 4 - Application Initialisation
======================================

The configuration database - '/Users/dpage/.pgadmin/test_pgadmin4.db'
does not exist.
Entering initial setup mode...
NOTE: Configuring authentication for DESKTOP mode.

The configuration database has been created at
/Users/dpage/.pgadmin/test_pgadmin4.db
Traceback (most recent call last):
File "runtests.py", line 268, in <module>
test_module_list = get_test_modules(args)
File "runtests.py", line 154, in get_test_modules
exclude_pkgs)
TypeError: load_generators() takes 2 positional arguments but 3 were given

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-02-09 12:47:17 Re: Acceptance Tests against a browser (WIP)
Previous Message Dave Page 2017-02-09 12:05:59 pgAdmin 4 commit: Ensure FTS parsers and templates are removed prior to