fixing pya module. adding tests

This commit is contained in:
Thomas Ferreira de Lima 2018-12-20 10:59:25 -05:00
parent a288b3ce39
commit 6b37e67de6
No known key found for this signature in database
GPG Key ID: 43E98870EAA0A86E
4 changed files with 10 additions and 11 deletions

View File

@ -478,6 +478,7 @@ script:
python setup.py bdist_wheel;
python setup.py install;
python -m unittest testdata/pymod/import_db.py testdata/pymod/import_rdb.py testdata/pymod/import_tl.py;
python testdata/pymod/pya_tests.py;
klayout_version=$(python -c 'import setup; print(setup.Config().version())');
mkdir -p deploy/dist-pymod/$klayout_version;
cp -a dist/* deploy/dist-pymod/$klayout_version;

View File

@ -69,3 +69,5 @@ TEST_HOME=/io/testdata
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/import_db.py || exit 1
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/import_rdb.py || exit 1
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/import_tl.py || exit 1
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/pya_tests.py || exit 1

View File

@ -1,5 +1,4 @@
# klayout library definition file
__all__ = [ "tl", "db", "lay", "rdb" ]
__all__ = [ "tl", "db", "rdb" ]

View File

@ -1,10 +1,7 @@
# import all packages from klayout, such as klayout.db and klayout.tl
# WARNING: doing it manually until it becomes impractical
# TODO: We need a specification document explaining what should go into pya
import klayout
import importlib
__all__ = []
for m in klayout.__all__:
mod = importlib.import_module("klayout." + m)
for mm in mod.__all__:
globals()[mm] = getattr(mod, mm)
from klayout.db import * # noqa
from klayout.tl import * # noqa
from klayout.rdb import * # noqa