From 520dd7b2b7cb5fc258bff19f3fdcd54347796442 Mon Sep 17 00:00:00 2001 From: Kevin Martin Date: Wed, 5 Nov 2025 07:46:20 -0500 Subject: [PATCH] Remove test from old location --- src/Mod/Test/Document.py | 45 ---------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 8c32849489..3d2d88231c 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -681,51 +681,6 @@ class DocumentBasicCases(unittest.TestCase): # closing doc FreeCAD.closeDocument("CreateTest") - -class DocumentImportCases(unittest.TestCase): - def testDXFImportCPPIssue20195(self): - if "BUILD_DRAFT" in FreeCAD.__cmake__: - import importDXF - from draftutils import params - - # Set options, doing our best to restore them: - wasShowDialog = params.get_param("dxfShowDialog") - wasUseLayers = params.get_param("dxfUseDraftVisGroups") - wasUseLegacyImporter = params.get_param("dxfUseLegacyImporter") - wasCreatePart = params.get_param("dxfCreatePart") - wasCreateDraft = params.get_param("dxfCreateDraft") - wasCreateSketch = params.get_param("dxfCreateSketch") - - try: - # disable Preferences dialog in gui mode (avoids popup prompt to user) - params.set_param("dxfShowDialog", False) - # Preserve the DXF layers (makes the checking of document contents easier) - params.set_param("dxfUseDraftVisGroups", True) - # Use the new C++ importer -- that's where the bug was - params.set_param("dxfUseLegacyImporter", False) - # create simple part shapes (3 params) - # This is required to display the bug because creation of Draft objects clears out the - # pending exception this test is looking for, whereas creation of the simple shape object - # actually throws on the pending exception so the entity is absent from the document. - params.set_param("dxfCreatePart", True) - params.set_param("dxfCreateDraft", False) - params.set_param("dxfCreateSketch", False) - importDXF.insert( - FreeCAD.getHomePath() + "Mod/Test/TestData/DXFSample.dxf", "ImportedDocName" - ) - finally: - params.set_param("dxfShowDialog", wasShowDialog) - params.set_param("dxfUseDraftVisGroups", wasUseLayers) - params.set_param("dxfUseLegacyImporter", wasUseLegacyImporter) - params.set_param("dxfCreatePart", wasCreatePart) - params.set_param("dxfCreateDraft", wasCreateDraft) - params.set_param("dxfCreateSketch", wasCreateSketch) - doc = FreeCAD.getDocument("ImportedDocName") - # This doc should have 3 objects: The Layers container, the DXF layer called 0, and one Line - self.assertEqual(len(doc.Objects), 3) - FreeCAD.closeDocument("ImportedDocName") - - # class must be defined in global scope to allow it to be reloaded on document open class SaveRestoreSpecialGroup: def __init__(self, obj):