64 Commits

Author SHA1 Message Date
Cosimo Lupo
c8901bf940 [tox] remove unneeded print statements
This information is already displayed by pytest in the header of the test run output
2016-10-14 18:35:33 +01:00
Cosimo Lupo
ce313520cf [tox] use --pyargs fontTools to run tests against package installed in tox env instead of source dir
This will ensure we don't forget to add any data files to the MANIFEST.in (which means test data is not available to the inlined tests).

{posargs} allows to pass extra arguments to the test runner, when runing `tox -- {posargs}` from the command line.

With `--pyargs` option, pytest tries to interpret arguments as python package/module names, and if import fails as regular filesystem paths.
2016-10-14 18:35:33 +01:00
Cosimo Lupo
1422170d22 move pytest default config to setup.cfg so it's available for python setup.py test as well as tox 2016-09-27 13:21:47 +01:00
Cosimo Lupo
6d02c79557 tox.ini: add {posargs} to pass additional command line arguments to py.test
When invoking the tox command, the arguments after the -- will be passed on to the py.test command:

For example:
$ tox -- -x -s -k 'test_something or test_other'

http://tox.readthedocs.io/en/1.0/example/general.html#interactively-passing-positional-arguments
2016-08-19 11:36:39 +01:00
Cosimo Lupo
c289580089 tox.ini: only include py27 and py35 in default 'envlist''
When running `tox` command without specifying any `-e` option, or when no $TOXENV environment variable is specified, the 'envlist' in tox.ini file determines the list of environment tox will operate on.

http://tox.readthedocs.io/en/latest/config.html#confval-envlist=CSV

I chose Python 2.7 and 3.5 because I assume they are the versions that other fonttols developers run their tests on locally, before pushing and let the CI run the tests on the rest of the pythons.
2016-08-19 11:31:07 +01:00
Cosimo Lupo
4d7cd66ebc tox.ini: drop py33 testenv 2016-08-06 19:46:22 +01:00
Cosimo Lupo
624fe3f625 tox.ini: configure coveralls 2016-04-11 01:11:01 +01:00
Cosimo Lupo
a37dc9f186 tox.ini: use {envpython} substituion for path to the virtual Python interpreter 2016-04-11 01:11:01 +01:00
Cosimo Lupo
5f8d0f8ecc tox.ini: I forgot that we still support python 3.3 (sorry)
I hope not for long, though.
2016-04-10 21:06:55 +01:00
Cosimo Lupo
7223267328 tox.ini: specify 'basepython' (with TOXPYTHON override); print python version and arch; call python -m pip to work around Appveyor-installed pip 2016-04-10 19:17:36 +01:00
Cosimo Lupo
464057a4db [tox.ini] set *Test pattern for pytest's python_classes
The glob pattern determines which classes are considered for test collection by pytest.
We already follow this pattern for the unittest.TestCase derived subclasses
(which are collected regardless of this option).
2016-02-07 17:42:55 +00:00
Cosimo Lupo
118045abf0 [tox.ini] tell pytest to only collect tests from *_test.py modules; set pytest 'minversion' to 2.8
the glob pattern will restricts the search only for pytest's kind of tests; it has no effect on methods of unittest.TestCase derived class, since pytest still uses unittest's own collection framework to collect those.

The 'minversion' is required to support some of the latest advanced features.
The current py.test is 2.8.7. You can update it with `pip install --upgrade pytest`.
2016-02-06 20:59:00 +00:00
Cosimo Lupo
568b4e9129 [tox.ini] use 'testpaths' to tell py.test where to look for tests
this to avoid picking up undesired tests by accident when running `py.test` command without specific dirs or files
2016-02-06 17:12:01 +00:00
Cosimo Lupo
12e5007b1d tox.ini: configure tox test environment; set up py.test to discover both doctest and unittest tests 2015-12-12 18:11:59 +00:00