mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 14:39:02 +08:00
13 lines
381 B
Python
13 lines
381 B
Python
# Copyright (c) 2018 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
import json
|
|
import os
|
|
|
|
|
|
def readFixture(fixture_name: str) -> bytes:
|
|
with open("{}/{}.json".format(os.path.dirname(__file__), fixture_name), "rb") as f:
|
|
return f.read()
|
|
|
|
def parseFixture(fixture_name: str) -> dict:
|
|
return json.loads(readFixture(fixture_name).decode())
|