Re: TAP testing in Python

2020-03-22 Thread Lukas Fleischer
On Sun, 22 Mar 2020 at 21:03:31, Frédéric Mangano-Tarumi wrote:
> I didn\u2019t realize it at first, but since pytest-tap outputs TAP already,
> a very simple shell wrapper invoking pytest with the right arguments
> should be enough to integrate it with the existing test structure.
> 

Great!

> One friction point with pytest-tap is that it\u2019s not in the official Arch
> repositories, unlike all the other libraries aurweb depends on. Most
> Python developers should be familiar with pip and virtualenv though, but
> that\u2019s inconsistent with the instructions in TESTING that suggest using
> pacman to install Python dependencies.

I will work on a package and add it to the repositories tomorrow.

Best regards,
Lukas


Re: TAP testing in Python

2020-03-22 Thread Frédéric Mangano-Tarumi
I’ve never used unittest, but from my experience pytest has all the
qualities you could wish for.

Lukas Fleischer [2020-03-22 17:35:23 -0400]
> How hard would it be to make pytest-tap compatible with the usual TAP
> test invocation?

I didn’t realize it at first, but since pytest-tap outputs TAP already,
a very simple shell wrapper invoking pytest with the right arguments
should be enough to integrate it with the existing test structure.

One friction point with pytest-tap is that it’s not in the official Arch
repositories, unlike all the other libraries aurweb depends on. Most
Python developers should be familiar with pip and virtualenv though, but
that’s inconsistent with the instructions in TESTING that suggest using
pacman to install Python dependencies.


Re: TAP testing in Python

2020-03-22 Thread Lukas Fleischer
On Sat, 21 Mar 2020 at 12:29:41, Filipe Laíns wrote:
> Why should we use unittest over pytest? pytest is easier to read and
> write, more extensible/has more integrations and has a larger userbase.
> The only caveat is that people would have to fo a quick read on
> fixtures before they start contributing.
> 
> Choosing pycotap over tappy/pytest-tap would make sense if we already
> had a codebase written in unittest, but we don't.
> 
> Lukas, what do you think?

I have a slight personal preference towards pytest. However, the much
more important questions to ask are:

1. How easy/convenient will it be to write tests for aurweb using the
   framework? What about maintainability?

2. How easy/straightforward will it be for future contributors to write
   tests using the framework?

3. How well does the framework integrate with the current test suite?

Having a small script that can be fully included in our source tree is a
nice bonus but shouldn't be one of the main criteria.

How hard would it be to make pytest-tap compatible with the usual TAP
test invocation?

Lukas


Re: [PATCH] Map BIGINT to INTEGER for SQLite

2020-03-22 Thread Lukas Fleischer
On Sat, 21 Mar 2020 at 14:13:45, Frédéric Mangano-Tarumi wrote:
> ---
>  aurweb/schema.py | 11 +++
>  1 file changed, 11 insertions(+)

Merged, thanks!