MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / test_path

Function test_path

python/test/test_usability.py:33–38  ·  view source on GitHub ↗

Assert you can load a model with a str or a pathlib.Path without throwing.

()

Source from the content-addressed store, hash-verified

31
32
33def test_path():
34 """Assert you can load a model with a str or a pathlib.Path without throwing."""
35 assert openstudio.model.Model.load("wrong.osm").empty()
36 assert openstudio.model.Model.load(Path("wrong.osm")).empty()
37 # And we still support toPath
38 assert openstudio.model.Model.load(openstudio.toPath("wrong.osm")).empty()
39
40
41def test_json():

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected