Merge pull request #811 from anthrotype/external-tests
move tests to external "Tests/" folder
This commit is contained in:
commit
89b688cecf
@ -23,7 +23,7 @@ def calcIntBounds(array):
|
||||
tuple: (xMin, yMin, xMax, yMax)
|
||||
Values are rounded to closest integer.
|
||||
"""
|
||||
return tuple(int(round(v)) for v in calcBounds(array))
|
||||
return tuple(round(v) for v in calcBounds(array))
|
||||
|
||||
|
||||
def updateBounds(bounds, p, min=min, max=max):
|
||||
|
15
MANIFEST.in
15
MANIFEST.in
@ -12,10 +12,11 @@ include run-tests.sh
|
||||
|
||||
recursive-include Doc/man/man1 *.1
|
||||
|
||||
recursive-include Lib/fontTools testdata/*.ttx testdata/*.otx testdata/*.fea
|
||||
recursive-include Lib/fontTools testdata/*.feax
|
||||
recursive-include Lib/fontTools testdata/*.txt testdata/*.ttx.*
|
||||
recursive-include Lib/fontTools testdata/mti/*.txt testdata/mti/*.ttx.*
|
||||
recursive-include Lib/fontTools testdata/mti/*.ttx testdata/mti/README
|
||||
recursive-include Lib/fontTools testdata/*.lwfn testdata/*.pfa testdata/*.pfb
|
||||
recursive-include Lib/fontTools testdata/*.xml testdata/*.designspace testdata/*.bin
|
||||
recursive-include Tests *.py
|
||||
recursive-include Tests data/*.ttx data/*.otx data/*.fea
|
||||
recursive-include Tests data/*.feax
|
||||
recursive-include Tests data/*.txt data/*.ttx.*
|
||||
recursive-include Tests data/mti/*.txt data/mti/*.ttx.*
|
||||
recursive-include Tests data/mti/*.ttx data/mti/README
|
||||
recursive-include Tests data/*.lwfn data/*.pfa data/*.pfb
|
||||
recursive-include Tests data/*.xml data/*.designspace data/*.bin
|
||||
|
16
README.md
16
README.md
@ -130,15 +130,25 @@ To run the test suite, you can do:
|
||||
python setup.py test
|
||||
```
|
||||
|
||||
Or if you have [pytest](http://docs.pytest.org/en/latest/), you can run the `pytest` command directly.
|
||||
If you have [pytest](http://docs.pytest.org/en/latest/), you can run the `pytest` command directly.
|
||||
The tests will run against the installed `fontTools` package, or the first one found in the `PYTHONPATH`.
|
||||
|
||||
We also use [tox](https://testrun.org/tox/latest/) to automatically test on different Python versions in isolated virtual environments.
|
||||
You can also use [tox](https://testrun.org/tox/latest/) to automatically run tests on different Python versions in isolated virtual environments.
|
||||
|
||||
```sh
|
||||
pip install -r dev-requirements.txt
|
||||
pip install tox
|
||||
tox
|
||||
```
|
||||
|
||||
Note that when you run `tox` without arguments, the tests are executed for all the environments listed in tox.ini's `envlist`. In our case, this includes Python 2.7, 3.5 and 3.6, so for this to work the `python2.7`, `python3.5` and `python3.6` executables must be available in your `PATH`.
|
||||
|
||||
You can specify an alternative environment list via the `-e` option, or the `TOXENV` environment variable:
|
||||
|
||||
```sh
|
||||
tox -e py27-nocov
|
||||
TOXENV="py{27,36}-cov" tox
|
||||
```
|
||||
|
||||
### Development Community
|
||||
|
||||
TTX/FontTools development is ongoing in an active community of developers, that includes professional developers employed at major software corporations and type foundries as well as hobbyists.
|
||||
|
0
Tests/feaLib/__init__.py
Normal file
0
Tests/feaLib/__init__.py
Normal file
@ -49,7 +49,7 @@ def makeTTFont():
|
||||
|
||||
|
||||
class BuilderTest(unittest.TestCase):
|
||||
# Feature files in testdata/*.fea; output gets compared to testdata/*.ttx.
|
||||
# Feature files in data/*.fea; output gets compared to data/*.ttx.
|
||||
TEST_FEATURE_FILES = """
|
||||
Attach enum markClass language_required
|
||||
GlyphClassDef LigatureCaretByIndex LigatureCaretByPos
|
||||
@ -86,7 +86,7 @@ class BuilderTest(unittest.TestCase):
|
||||
@staticmethod
|
||||
def getpath(testfile):
|
||||
path, _ = os.path.split(__file__)
|
||||
return os.path.join(path, "testdata", testfile)
|
||||
return os.path.join(path, "data", testfile)
|
||||
|
||||
def temp_path(self, suffix):
|
||||
if not self.tempdir:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user