mirror of https://github.com/KLayout/klayout.git
Added standard Python tests to pymod too
This will include the normal Python tests also in pymod, hence aligning the test base for pymod and pya. This feature requires the pya compatibility module.
This commit is contained in:
parent
e47584460b
commit
7ade9cf079
|
|
@ -43,7 +43,7 @@ msvc {
|
||||||
}
|
}
|
||||||
INSTALLS += init_target
|
INSTALLS += init_target
|
||||||
|
|
||||||
# And also provide the pya compatbility module here
|
# And also provide the pya compatibility module here
|
||||||
|
|
||||||
msvc {
|
msvc {
|
||||||
QMAKE_POST_LINK += && (if not exist $$shell_path($$DESTDIR_PYMOD/../pya) $(MKDIR) $$shell_path($$DESTDIR_PYMOD/../pya)) && $(COPY) $$shell_path($$PWD/../distutils_src/pya/*.py) $$shell_path($$DESTDIR_PYMOD/../pya)
|
QMAKE_POST_LINK += && (if not exist $$shell_path($$DESTDIR_PYMOD/../pya) $(MKDIR) $$shell_path($$DESTDIR_PYMOD/../pya)) && $(COPY) $$shell_path($$PWD/../distutils_src/pya/*.py) $$shell_path($$DESTDIR_PYMOD/../pya)
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,8 @@ PYMODTEST (import_QtXmlPatterns, "import_QtXmlPatterns.py")
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
PYMODTEST (import_pya, "pya_tests.py")
|
||||||
|
|
||||||
#elif defined(HAVE_QT)
|
#elif defined(HAVE_QT)
|
||||||
|
|
||||||
PYMODTEST (import_lay, "import_lay_noqt.py")
|
PYMODTEST (import_lay, "import_lay_noqt.py")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "python"))
|
||||||
|
|
||||||
|
# Include all tests from testdata/python
|
||||||
|
# Missing:
|
||||||
|
# - basic.py (Test classes not available yet)
|
||||||
|
# - qtbinding (No applicable because QApplication is missing)
|
||||||
|
|
||||||
|
import tlTest
|
||||||
|
import dbPCells
|
||||||
|
import dbLayoutTest
|
||||||
|
import dbPolygonTest
|
||||||
|
import dbReaders
|
||||||
|
import dbRegionTest
|
||||||
|
import dbTransTest
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(tlTest.TLTest)
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(dbPCells.DBPCellTests)
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(dbLayoutTest.DBLayoutTests)
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(dbPolygonTest.DBPolygonTests)
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(dbReaders.DBReadersTests)
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(dbRegionTest.DBRegionTest)
|
||||||
|
suite = unittest.TestLoader().loadTestsFromTestCase(dbTransTest.DBTransTests)
|
||||||
|
|
||||||
|
if not unittest.TextTestRunner(verbosity = 1).run(suite).wasSuccessful():
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
Loading…
Reference in New Issue