Message5674
On 28/06/16 08:26, John Rouillard wrote:
> Well it's better but postgres tests still being run.
Check to see if you have the 'psycopg' python package installed. The
tests rely on using 'roundup.backend.have_backend()'[1] to determine if
the backend is available and will attempt to run the tests if it returns
True. The 'have_backend()' essentially returns True for postgresql if
the 'psycopg' package is installed.
> sqlite shouldn't be skipped. Postgres should be skipped not fail.
>
> All the postgres errors are of the form:
>
>> raise hyperdb.DatabaseError(message)
> E DatabaseError: could not connect to server: Connection refused
> E Is the server running on host "localhost" (127.0.0.1) and
> accepting
> E TCP/IP connections on port 5432?
>
> roundup/backends/back_postgresql.py:91: DatabaseError
>
> If I move the definiton do the sqlite test before postgres and mysql,
> they all pass. So it looks like the @skip_mysql decorator is
> applying to the
>
> class sqliteIndexerTest(sqliteOpener, RDBMSIndexerTest, IndexerTest):
> pass
>
> unless I move this class definition above postgres.
It seems as though 'pytest.mark.skip()' bug[2] taints any test that
shares a parent test class, not just the other tests that are marked to
be skipped by pytest - which is what I thought the problem was.
I'll do a bit more looking to see if an improved work-around can be found.
[1]
https://sourceforge.net/p/roundup/code/ci/37d1e24fb9/tree/roundup/backends/__init__.py#l46
[2] https://github.com/pytest-dev/pytest/issues/568 |
|
Date |
User |
Action |
Args |
2016-06-28 05:22:29 | jerrykan | set | recipients:
+ jerrykan, rouilj |
2016-06-28 05:22:29 | jerrykan | link | issue2550910 messages |
2016-06-28 05:22:29 | jerrykan | create | |
|