mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
Fix #1727. BIMTester now runs within the BlenderBIM Add-on, implement attribute checking in IDS, and fix some minor IDS bugs.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# BlenderBIM Add-on - OpenBIM Blender Add-on
|
||||
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
||||
#
|
||||
# This file is part of BlenderBIM Add-on.
|
||||
#
|
||||
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# BlenderBIM Add-on is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import test.bim.bootstrap
|
||||
|
||||
|
||||
class TestExecuteBIMTester(test.bim.bootstrap.NewFile):
|
||||
@test.bim.bootstrap.scenario
|
||||
def test_executing_bimtester(self):
|
||||
return """
|
||||
Given an empty IFC project
|
||||
When I enable "scene.BimTesterProperties.should_load_from_memory"
|
||||
And I set "scene.BimTesterProperties.feature" to "{cwd}/test/files/sample-ids.xml"
|
||||
And I press "bim.execute_bim_tester"
|
||||
Then the file "{cwd}/test/files/sample-ids.xml.html" should contain "Tests passed: <strong>1 / 1</strong> (100%)"
|
||||
"""
|
||||
@@ -26,7 +26,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile):
|
||||
Given an empty IFC project
|
||||
When I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I select "IfcWall" in "scene.BIMRootProperties.ifc_class"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
Then the object "IfcWall/Cube" is an "IfcWall"
|
||||
And the object "IfcWall/Cube" is in the collection "Collection"
|
||||
@@ -39,8 +39,8 @@ class TestAssignClass(test.bim.bootstrap.NewFile):
|
||||
Given an empty IFC project
|
||||
When I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I select "IfcElementType" in "scene.BIMRootProperties.ifc_product"
|
||||
And I select "IfcWallType" in "scene.BIMRootProperties.ifc_class"
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
Then the object "IfcWallType/Cube" is an "IfcWallType"
|
||||
And the object "IfcWallType/Cube" is in the collection "Types"
|
||||
@@ -53,8 +53,8 @@ class TestAssignClass(test.bim.bootstrap.NewFile):
|
||||
Given an empty IFC project
|
||||
When I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I select "IfcSpatialElement" in "scene.BIMRootProperties.ifc_product"
|
||||
And I select "IfcBuilding" in "scene.BIMRootProperties.ifc_class"
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcSpatialElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcBuilding"
|
||||
And I press "bim.assign_class"
|
||||
Then the object "IfcBuilding/Cube" is an "IfcBuilding"
|
||||
And the object "IfcBuilding/Cube" is in the collection "IfcBuilding/Cube"
|
||||
@@ -67,8 +67,8 @@ class TestAssignClass(test.bim.bootstrap.NewFile):
|
||||
Given an empty IFC project
|
||||
When I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I select "IfcElement" in "scene.BIMRootProperties.ifc_product"
|
||||
And I select "IfcOpeningElement" in "scene.BIMRootProperties.ifc_class"
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcOpeningElement"
|
||||
And I press "bim.assign_class"
|
||||
Then the object "IfcOpeningElement/Cube" is an "IfcOpeningElement"
|
||||
And the object "IfcOpeningElement/Cube" is in the collection "IfcOpeningElements"
|
||||
@@ -82,7 +82,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile):
|
||||
When I add a cube
|
||||
And the object "Cube" is selected
|
||||
And the object "Cube" is placed in the collection "IfcBuildingStorey/My Storey"
|
||||
And I select "IfcWall" in "scene.BIMRootProperties.ifc_class"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
Then the object "IfcWall/Cube" is contained in "My Storey"
|
||||
"""
|
||||
@@ -95,7 +95,7 @@ class TestCopyClass(test.bim.bootstrap.NewFile):
|
||||
Given an empty IFC project
|
||||
When I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I select "IfcWall" in "scene.BIMRootProperties.ifc_class"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I duplicate the selected objects
|
||||
Then the object "IfcWall/Cube" and "IfcWall/Cube.001" are different elements
|
||||
|
||||
Reference in New Issue
Block a user