Title: BIMTester, if translated feature fails, behave does not catch the exception · Issue #1888 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: BIMTester, if translated feature fails, behave does not catch the exception · Issue #1888 · IfcOpenShell/IfcOpenShell
X Title: BIMTester, if translated feature fails, behave does not catch the exception · Issue #1888 · IfcOpenShell/IfcOpenShell
Description: Open source IFC library and geometry engine. Contribute to IfcOpenShell/IfcOpenShell development by creating an account on GitHub.
Open Graph Description: Open source IFC library and geometry engine. Contribute to IfcOpenShell/IfcOpenShell development by creating an account on GitHub.
X Description: Open source IFC library and geometry engine. Contribute to IfcOpenShell/IfcOpenShell development by creating an account on GitHub.
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BIMTester, if translated feature fails, behave does not catch the exception","articleBody":"tested on https://github.com/IfcOpenShell/IfcOpenShell/commit/04535d27ecc1af7bcb25f340b4d9f323355885a5\r\n\r\nIf features in other languages than englisch are used and they fail there are problems ... \r\n\r\nfind python code here to run the example ... https://community.osarch.org/discussion/comment/9690/#Comment_9690\r\n\r\ntry Englisch feature file with column example: add the following test and run bimtester ...\r\n```gherkin\r\nScenario: Properties\r\n * All \"IfcBuildingElement\" elements have an \"MyProperty\" property in the \"MyPset\" pset\r\n```\r\nthe test will fail because \"MyPset.MyProperty\" does not exist in the ifc. In the html report is says ...\r\n\r\n```\r\nAll \"IfcBuildingElement\" elements have an \"MyProperty\" property in the \"MyPset\" pset 0.0s\r\n\r\nAssertion Failed: All 1 IfcBuildingElement elements are missing the property MyProperty in the pset.\r\n```\r\n\r\ntry German feature file with column example: add the following test and run bimtester ...\r\n```gherkin\r\nSzenario: Attribute\r\n * Alle \"IfcBuildingElement\" Bauteile haben das Attribut \"MyProperty\" im PSet \"MyPset\"\r\n```\r\nthe test will fail but the exception is not catched. In in the html report is says ...\r\n\r\n```\r\nAlle \"IfcBuildingElement\" Bauteile haben das Attribut \"MyProperty\" im PSet \"MyPset\" 0.02s\r\n\r\nSubstep info: Assertion Failed: All 1 IfcBuildingElement elements are missing the property MyProperty in the pset.\r\nTraceback (of failed substep):\r\nFile \"C:\\0_BHA_privat\\progr\\FreeCAD\\FreeCAD_0.20.xxxxx\\bin\\lib\\site-packages\\behave\\model.py\", line 1329, in run\r\nmatch.run(runner.context)\r\nFile \"C:\\0_BHA_privat\\progr\\FreeCAD\\FreeCAD_0.20.xxxxx\\bin\\lib\\site-packages\\behave\\matchers.py\", line 98, in run\r\nself.func(context, *args, **kwargs)\r\nFile \"C:\\Users\\BHA\\Desktop\\IfcOpenShell\\src\\ifcbimtester\\bimtester\\features\\steps\\attributes_psets\\en.py\", line 11, in step_impl\r\neleclass_has_property_in_pset(\r\nFile \"C:\\Users\\BHA\\Desktop\\IfcOpenShell\\src\\ifcbimtester\\bimtester\\features\\steps\\attributes_psets\\en.py\", line 81, in eleclass_has_property_in_pset\r\nassert_elements(\r\nFile \"C:\\Users\\BHA\\Desktop\\IfcOpenShell\\src\\ifcbimtester\\bimtester\\util.py\", line 108, in assert_elements\r\nassert False, message_all_falseelems.format(elemcount=elemcount, ifc_class=ifc_class, parameter=parameter)\r\n```\r\n\r\nIf at this code line the method is called instead the english test it works fine ... https://github.com/IfcOpenShell/IfcOpenShell/blob/04535d27ecc1af7bcb25f340b4d9f323355885a5/src/ifcbimtester/bimtester/features/steps/attributes_psets/de.py#L9\r\n\r\nshould be changed to\r\n```python\r\n #context.execute_steps(f'* All \"{ifc_class}\" elements have an \"{aproperty}\" property in the \"{pset}\" pset')\r\n from bimtester.features.steps.attributes_psets.en import eleclass_has_property_in_pset\r\n eleclass_has_property_in_pset(\r\n context,\r\n ifc_class,\r\n aproperty,\r\n pset\r\n )\r\n```\r\nThan the test fails too but the exception is catched like on English feature file example ...\r\n```\r\nAlle \"IfcBuildingElement\" Bauteile haben das Attribut \"MyProperty\" im PSet \"MyPset\" 0.0s\r\n\r\nAssertion Failed: All 1 IfcBuildingElement elements are missing the property MyProperty in the pset.\r\n```\r\n","author":{"url":"https://github.com/berndhahnebach","@type":"Person","name":"berndhahnebach"},"datePublished":"2021-11-21T20:32:37Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/1888"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:41268166-294a-b038-79a2-f4cb05e132a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 97FE:2A3C1B:634CD5:84F0F4:6B04A732 |
| html-safe-nonce | bd5af6e31567301fc3968474e1c7f40c87a074fc2a7f78374efb65ad8427019d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0ZFOjJBM0MxQjo2MzRDRDU6ODRGMEY0OjZCMDRBNzMyIiwidmlzaXRvcl9pZCI6Ijc0NTIzMzk3NTcyOTM4MDc0MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 974d2995eea1409910d96c37129e90bd602a526d8e0b0adb0c66db8f121961aa |
| hovercard-subject-tag | repository:40473201 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/issues/1888 |
| twitter:image | https://opengraph.githubassets.com/28e4520c7d86b1b5225c8b336ba660404d70fd027548b7630a2530d57c89e9c2/IfcOpenShell/IfcOpenShell |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/28e4520c7d86b1b5225c8b336ba660404d70fd027548b7630a2530d57c89e9c2/IfcOpenShell/IfcOpenShell |
| og:image:alt | Open source IFC library and geometry engine. Contribute to IfcOpenShell/IfcOpenShell development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| turbo-cache-control | no-cache |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width