diff --git a/tests/test_mceditlib/extended_id_test.py b/tests/test_mceditlib/extended_id_test.py index ea603cd..207d19b 100644 --- a/tests/test_mceditlib/extended_id_test.py +++ b/tests/test_mceditlib/extended_id_test.py @@ -45,8 +45,7 @@ def test_extid_extract(tmpdir, extid_pc_world): ]: schem = extractSchematicFrom(extid_pc_world.getDimension(), BoundingBox((0, 0, 0), size)) filename = tmpdir.join("extid_extract_%s_%s_%s" % size).strpath - schem.filename = filename - schem.saveChanges() + schem.saveToFile(filename) del schem schem = WorldEditor(filename) assert (schem.adapter.Blocks > 255).any() diff --git a/tests/test_mceditlib/nbt_test.py b/tests/test_mceditlib/nbt_test.py index 0dfa27a..68bb80a 100644 --- a/tests/test_mceditlib/nbt_test.py +++ b/tests/test_mceditlib/nbt_test.py @@ -22,7 +22,7 @@ def testLoad(indev_file): return level @pytest.mark.parametrize(['temp_file'], [('uncompressed.nbt',)], indirect=True) -def testLoadUncompressed(self, temp_file): +def testLoadUncompressed(temp_file): rootTag = nbt.load(temp_file.strpath) @pytest.fixture diff --git a/tests/test_mceditlib/relight_test.py b/tests/test_mceditlib/relight_test.py index 3f3698b..e3abd0c 100644 --- a/tests/test_mceditlib/relight_test.py +++ b/tests/test_mceditlib/relight_test.py @@ -4,7 +4,8 @@ import numpy logging.basicConfig(level=logging.INFO) -def test_relight(pc_world): + +def test_relight(schematic_world, pc_world): anvilDim = pc_world.getDimension() bounds = anvilDim.bounds point = bounds.origin + (bounds.size * (0.5, 0.5, 0.5)) @@ -15,8 +16,7 @@ def test_relight(pc_world): for c in chunks: anvilDim.deleteChunk(*c) - station = TempLevel("station.schematic") - stationDim = station.getDimension() + stationDim = schematic_world.getDimension() anvilDim.copyBlocks(stationDim, stationDim.bounds, point, create=True) pc_world.saveChanges() diff --git a/tests/test_mceditlib/revisionhistory_test.py b/tests/test_mceditlib/revisionhistory_test.py index 022be33..50c3dee 100644 --- a/tests/test_mceditlib/revisionhistory_test.py +++ b/tests/test_mceditlib/revisionhistory_test.py @@ -18,7 +18,7 @@ from mceditlib import nbt @pytest.fixture def history(tmpdir): filename = "AnvilWorld" - tmpname = copy_temp_file(filename) + tmpname = copy_temp_file(tmpdir, filename) return RevisionHistory(tmpname)