Creating and running tests for a snapcraft plugin

Leo Arias leo.arias at canonical.com
Thu Mar 2 02:01:01 UTC 2017


Hello!

Thanks for working on a new plugin.

On Thu, Feb 23, 2017 at 5:13 PM, Joseph Rushton Wakeling
<joseph.wakeling at webdrake.net> wrote:
> Is there a simple way to run the tests for a single plugin, rather than the
> whole body of tests?  The snapcraft HACKING.md doesn't offer any advice on
> this point.

To run all the tests related to python, for example, you can do
something like this:

./runtests.sh unit *python*
./runtests.sh integration *python*

That filter is by file name. You can do fancier things with python's discovery:
https://docs.python.org/3.5/library/unittest.html#unittest-test-discovery

pura vida.




More information about the Snapcraft mailing list