コード例 #1
0
ファイル: test_data_pack.py プロジェクト: misode/beet
def test_context_manager_load(tmp_path: Path):
    with DataPack(path=tmp_path / "foobar") as p1:
        p1["hello:world"] = Function(["say hello"], tags=["minecraft:load"])

    p2 = DataPack()
    p2.load(tmp_path / "foobar")
    assert p2 == p1
コード例 #2
0
ファイル: directive.py プロジェクト: mcbeet/lectern
 def __call__(self, fragment: Fragment, assets: ResourcePack,
              data: DataPack):
     data.load(self.bundle_pack_fragment(fragment))