Files
create/src/Mod/Test/CMakeLists.txt
Kevin Martin 0986dadb2f Correct non-gui DXF C++ importer to not generate pending python exceptions (#20328)
* Add a test case for DXF import

* Test gui flag rather than look for import error to make gui decision

The new code is cleaner and faster and avoids any exception stuff

* Properly avoid trying to use Layer's View object in non-GUI

The code was trying to avoid this but had a Python None object rather than a null C++ pointer and so tried setting a property on None. This left an unhandled exception state which acted as a booby trap that caused the later failure of some unrelated code.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* De-lint, remove wong "unsupported" message
Hidden layers have been supported for a while but still generated an import note about this being unsupported.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-31 11:20:37 -05:00

57 lines
982 B
CMake

SET(Test_SRCS
__init__.py
Init.py
BaseTests.py
Document.py
GuiDocument.py
Metadata.py
StringHasher.py
Menu.py
TestApp.py
TestGui.py
UnicodeTests.py
UnitTests.py
Workbench.py
unittestgui.py
testmakeWireString.py
TestPythonSyntax.py
TestPerf.py
)
SET(TestData_SRCS
TestData/basic_metadata.xml
TestData/bad_root_node.xml
TestData/bad_xml.xml
TestData/bad_version.xml
TestData/content_items.xml
TestData/DXFSample.dxf
)
SOURCE_GROUP("" FILES ${Test_SRCS} ${TestData_SRCS})
if(BUILD_GUI)
add_subdirectory(Gui)
list (APPEND Test_SRCS InitGui.py)
endif(BUILD_GUI)
ADD_CUSTOM_TARGET(Test ALL
SOURCES ${Test_SRCS} ${TestData_SRCS}
)
fc_copy_sources(Test "${CMAKE_BINARY_DIR}/Mod/Test" ${Test_SRCS} ${TestData_SRCS})
INSTALL(
FILES
${Test_SRCS}
DESTINATION
Mod/Test
)
INSTALL(
FILES
${TestData_SRCS}
DESTINATION
Mod/Test/TestData
)