Patch up a few remaining tests

This commit is contained in:
David Vierra 2015-10-30 04:42:14 -10:00
parent 58ab4d32e0
commit 00913303cc
4 changed files with 6 additions and 7 deletions

View File

@ -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()

View File

@ -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

View File

@ -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()

View File

@ -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)