[Tests] Do not require fonttools command to be available
I typically run tests like: $ python setup.py build_ext -i && PYTHONPATH=Lib pytest Previously, this particular test and only this, required that a `pip install -e .` has had happened. Not anymore.
This commit is contained in:
parent
0c2652011e
commit
ecd2d8e559
@ -2,7 +2,6 @@ import contextlib
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import run
|
|
||||||
from typing import List, Optional, Tuple
|
from typing import List, Optional, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -28,18 +27,17 @@ def test_main(tmpdir: Path):
|
|||||||
input = tmpdir / "in.ttf"
|
input = tmpdir / "in.ttf"
|
||||||
fb.save(str(input))
|
fb.save(str(input))
|
||||||
output = tmpdir / "out.ttf"
|
output = tmpdir / "out.ttf"
|
||||||
run(
|
args = [
|
||||||
[
|
"--gpos-compression-level",
|
||||||
"fonttools",
|
"5",
|
||||||
"otlLib.optimize",
|
str(input),
|
||||||
"--gpos-compression-level",
|
"-o",
|
||||||
"5",
|
str(output),
|
||||||
str(input),
|
]
|
||||||
"-o",
|
from fontTools.otlLib.optimize import main
|
||||||
str(output),
|
|
||||||
],
|
ret = main(args)
|
||||||
check=True,
|
assert ret in (0, None)
|
||||||
)
|
|
||||||
assert output.exists()
|
assert output.exists()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user