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:
Matthias Koefferlein 2018-11-18 22:42:13 +01:00
parent e47584460b
commit 7ade9cf079
3 changed files with 34 additions and 1 deletions

View File

@ -43,7 +43,7 @@ msvc {
}
INSTALLS += init_target
# And also provide the pya compatbility module here
# And also provide the pya compatibility module here
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)

View File

@ -109,6 +109,8 @@ PYMODTEST (import_QtXmlPatterns, "import_QtXmlPatterns.py")
#endif
PYMODTEST (import_pya, "pya_tests.py")
#elif defined(HAVE_QT)
PYMODTEST (import_lay, "import_lay_noqt.py")

31
testdata/pymod/pya_tests.py vendored Normal file
View File

@ -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)