10 Commits

Author SHA1 Message Date
David Vierra
3095eacaa3 Tests now import pymclevel modules relative to pymclevel. This removes the need to fiddle with PYTHONPATH, so run_tests.sh is removed. 2013-01-07 13:53:10 -10:00
David Vierra
03566f957f Added: Add copyChunkFrom to MCInfdevOldLevel and MCRegionFile.
This function copies a single chunk from the same location in another world. This is much faster than using copyBlocksFrom because it doesn't have to adjust entity locations or even fully load the chunk if it's not necessary.
2012-11-12 23:56:31 -10:00
David Vierra
30cfb1d380 Test: testFillBlocks calls fillBlocks with a blocksToReplace argument 2012-10-31 14:30:24 -10:00
David Vierra
14f5343504 Test: Improve copyConvertBlocks to count entities copied 2012-10-31 02:03:57 -10:00
David Vierra
f36634b6e4 Refactor: Move copyBlocksFrom and supporting methods to its own file and simplify them.
Add a function to ChunkBase for getting the slices for a chunk's arrays and the area of the chunk bounded by a given BoundingBox
Remove copyBlocksFromFinite and use copyBlocksFromInfinite as the default implementation
Rewrite copyBlocksFrom to use chunk.getChunkSlicesForBox instead of world.getChunkSlices
2012-10-30 17:05:11 -10:00
David Vierra
5b5f3999cb Test: Move the extended HeightMap test from mcr_test to anvil_test and give it a better name.
This test only checks that the TAG_Int_Array-type HeightMap's byte order gets swapped correctly when saving and loading.
2012-10-29 16:37:54 -10:00
David Vierra
df75222f2b Test: testDeleteChunks asserts that the chunk is no longer present. 2012-10-29 16:14:58 -10:00
David Vierra
f4b40912a3 Fixed: Statement seems to have no effect
Change several strings-in-void-context into comments like they ought to be.
Change member accesses in void context into assertions or prints.
2012-10-27 15:05:08 -10:00
David Vierra
78e45aedfb Refactor: Remove compressedChunks and related methods and data from MCInfdevOldLevel and AnvilChunk
Move MCRegionFile to its own source file.
Remove knowledge of chunk structure from MCRegionFile. Rename loadChunk to readChunk.
Remove compress, decompress, unload, isLoaded, compressedSize methods.
Remove compressedTag, dataIsPacked, loadedChunkQueue/Limit, decompressedChunkQueue/Limit members.
Rename InfdevChunk to AnvilChunk. Keep in place the conversion to old-style chunks until all client code is updated.
Remove most checks for self.version and keep only the VERSION_ANVIL code in place
Rename Alpha tests to Anvil tests.
Change several tests to load the AnvilWorld test data.
Change ZipSchematic test to export an area from the center of the world instead of from hard-coded coordinates.
2012-10-27 15:04:28 -10:00
David Vierra
7696ff9dfa Split up tests into separate files
Because they're in a subfolder, we need to add pymclevel's folder to PYTHONPATH when running tests. See run_tests.sh
2012-10-08 18:39:11 -10:00