[pgadmin4][patch] Use pytest test runner for unit tests

From: Anthony Emengo <aemengo(at)pivotal(dot)io>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgadmin4][patch] Use pytest test runner for unit tests
Date: 2018-05-23 21:48:45
Message-ID: CAG8BBZM0gapFd0ZvMq7euCYamxKEBNqewC4YX4bYddyc_6AatA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hey all,

Attached is a rather large patch that attempts to introduce the Pytest test
runner and Grappah test matcher into our code base. The patch replaces all
of the previous python unit tests from the previous design. This is a
follow-up from our previous proof of concept and discussion around the
idiosyncrasies of our existing test suite.

We are motivated to submit this change for the following reasons:

1. Having a highly customized test suite increases the learning curve
towards contributing to the code base. Pytest is a mature stable python
test framework that outside developers are more likely to be familiar with.
2. Pytest supports a lot of the features that we've built for our use-cases
- out of the box, and with extensive documentation on the matter.
3. The lack of ability to run tests individually has become a pain point.
Especially when it comes to debugging long running feature tests.

Test can be ran with the following command:

yarn test:unit


Please let us know what you think and if there are any issues!

*Note: *The feature tests are not yet completed. We expect our CI to fail
as a result of this patch. We will complete this step soon in a follow-up
patch!

https://docs.pytest.org/en/latest/
https://github.com/grappa-py/grappa

Thanks,
Anthony && Joao && Victoria

Attachment Content-Type Size
0001-Use-Pytests.diff application/octet-stream 1.2 MB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Aditya Toshniwal 2018-05-24 03:47:14 Re: [pgAdmin4][RM#3271] Update to the latest 3.x version of jQuery
Previous Message Dave Page 2018-05-23 14:16:35 Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree