Initial Python 3 port
Many things work, some don't. Notably, genPOI doesn't work, and there's some signedness comparison stuff going on in the C extension. This also completely drops support for Python 2, as maintaining a C extension for both Python 2 and 3 is a pain and not worth it for the 9 months that Python 2 is still going to be supported upstream. The documentation needs to be adjusted as well. All of the few tests we have pass, and rendering a map works, both with a configuration file and without. We can also use optimizeimages. Concerns #1528.
This commit is contained in:
@@ -17,19 +17,19 @@ class ExampleWorldTest(unittest.TestCase):
|
||||
w = world.World("test/data/worlds/exmaple")
|
||||
|
||||
regionsets = w.get_regionsets()
|
||||
self.assertEquals(len(regionsets), 3)
|
||||
self.assertEqual(len(regionsets), 3)
|
||||
|
||||
regionset = regionsets[0]
|
||||
self.assertEquals(regionset.get_region_path(0,0), 'test/data/worlds/exmaple/DIM-1/region/r.0.0.mcr')
|
||||
self.assertEquals(regionset.get_region_path(-1,0), 'test/data/worlds/exmaple/DIM-1/region/r.-1.0.mcr')
|
||||
self.assertEquals(regionset.get_region_path(1,1), 'test/data/worlds/exmaple/DIM-1/region/r.0.0.mcr')
|
||||
self.assertEquals(regionset.get_region_path(35,35), None)
|
||||
self.assertEqual(regionset.get_region_path(0,0), 'test/data/worlds/exmaple/DIM-1/region/r.0.0.mcr')
|
||||
self.assertEqual(regionset.get_region_path(-1,0), 'test/data/worlds/exmaple/DIM-1/region/r.-1.0.mcr')
|
||||
self.assertEqual(regionset.get_region_path(1,1), 'test/data/worlds/exmaple/DIM-1/region/r.0.0.mcr')
|
||||
self.assertEqual(regionset.get_region_path(35,35), None)
|
||||
|
||||
# a few random chunks. reference timestamps fetched with libredstone
|
||||
self.assertEquals(regionset.get_chunk_mtime(0,0), 1316728885)
|
||||
self.assertEquals(regionset.get_chunk_mtime(-1,-1), 1316728886)
|
||||
self.assertEquals(regionset.get_chunk_mtime(5,0), 1316728905)
|
||||
self.assertEquals(regionset.get_chunk_mtime(-22,16), 1316786786)
|
||||
self.assertEqual(regionset.get_chunk_mtime(0,0), 1316728885)
|
||||
self.assertEqual(regionset.get_chunk_mtime(-1,-1), 1316728886)
|
||||
self.assertEqual(regionset.get_chunk_mtime(5,0), 1316728905)
|
||||
self.assertEqual(regionset.get_chunk_mtime(-22,16), 1316786786)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user