mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 12:12:15 +00:00
Rework NewBrick and LoadBrick in test_brick.py to fit with new VGC format
- VGC means VersionedGraphCollection. - BrickStore.schema is now a filepath, so make that the case in the testing also.
This commit is contained in:
@@ -307,10 +307,8 @@ class TestImportBrickItems(NewFile):
|
|||||||
class TestLoadBrickFile(NewFile):
|
class TestLoadBrickFile(NewFile):
|
||||||
def test_run(self):
|
def test_run(self):
|
||||||
# We stub the schema to make tests run faster
|
# We stub the schema to make tests run faster
|
||||||
BrickStore.schema = brickschema.Graph()
|
|
||||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||||
schema_path = os.path.join(cwd, "..", "files", "BrickStub.ttl")
|
BrickStore.schema = os.path.join(cwd, "..", "files", "BrickStub.ttl")
|
||||||
BrickStore.schema.load_file(schema_path)
|
|
||||||
|
|
||||||
# This is the actual test
|
# This is the actual test
|
||||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||||
@@ -322,10 +320,8 @@ class TestLoadBrickFile(NewFile):
|
|||||||
class TestNewBrickFile(NewFile):
|
class TestNewBrickFile(NewFile):
|
||||||
def test_run(self):
|
def test_run(self):
|
||||||
# We stub the schema to make tests run faster
|
# We stub the schema to make tests run faster
|
||||||
BrickStore.schema = brickschema.Graph()
|
|
||||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||||
schema_path = os.path.join(cwd, "..", "files", "BrickStub.ttl")
|
BrickStore.schema = os.path.join(cwd, "..", "files", "BrickStub.ttl")
|
||||||
BrickStore.schema.load_file(schema_path)
|
|
||||||
|
|
||||||
# This is the actual test
|
# This is the actual test
|
||||||
subject.new_brick_file()
|
subject.new_brick_file()
|
||||||
|
|||||||
Reference in New Issue
Block a user