Re: [patch] change --pkg behavior

From: Atira Odhner <aodhner(at)pivotal(dot)io>
To: Dave Page <dpage(at)pgadmin(dot)org>
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 20:20:12
Message-ID: CA+Vc24o-rZKwPvmnqcqerKd4RhkQ4Z5P0n8BjDKqVULSMwafKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

It looks like there was some test setup logic that happened in
test_utils.py that was node-name specific. We've removed that logic and
re-enabled cleaning up the test databases.

Tira & George

On Thu, Feb 9, 2017 at 7:16 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

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

Attachment Content-Type Size
0001-PATCH-Run-tests-pkg-not-shallow.patch application/octet-stream 2.3 KB
0002-PATCH-Add-exclude-parameter-for-tests.patch application/octet-stream 4.4 KB
0003-PATCH-Make-test-setup-node-independent-and-delete-te.patch application/octet-stream 4.8 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message George Gelashvili 2017-02-09 23:22:10 building with Qt runtime question
Previous Message Atira Odhner 2017-02-09 19:03:42 Re: [patch] RM2163 emboldened syntax highlighting