Tests now import pymclevel modules relative to pymclevel. This removes the need to fiddle with PYTHONPATH, so run_tests.sh is removed.
This commit is contained in:
parent
1e649dc2e7
commit
3095eacaa3
@ -1,5 +1,5 @@
|
||||
rm _nbt.pyd
|
||||
sh run_tests.sh test/nbt_test.py
|
||||
python setup_nbt.py build_ext --inplace
|
||||
sh run_tests.sh test/nbt_test.py
|
||||
py.test test/nbt_test.py
|
||||
python setup.py build_ext --inplace
|
||||
py.test test/nbt_test.py
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
PYTHONPATH=. py.test $@
|
@ -4,12 +4,12 @@ import shutil
|
||||
import unittest
|
||||
import numpy
|
||||
|
||||
import mclevel
|
||||
from infiniteworld import MCInfdevOldLevel
|
||||
import nbt
|
||||
from schematic import MCSchematic
|
||||
from box import BoundingBox
|
||||
import block_copy
|
||||
from pymclevel import mclevel
|
||||
from pymclevel.infiniteworld import MCInfdevOldLevel
|
||||
from pymclevel import nbt
|
||||
from pymclevel.schematic import MCSchematic
|
||||
from pymclevel.box import BoundingBox
|
||||
from pymclevel import block_copy
|
||||
from templevel import mktemp, TempLevel
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
@ -1,4 +1,4 @@
|
||||
from schematic import MCSchematic
|
||||
from pymclevel.schematic import MCSchematic
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import unittest
|
||||
from test.templevel import TempLevel
|
||||
from templevel import TempLevel
|
||||
|
||||
from box import BoundingBox
|
||||
from entity import Entity, TileEntity
|
||||
from pymclevel.box import BoundingBox
|
||||
from pymclevel.entity import Entity, TileEntity
|
||||
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import unittest
|
||||
import numpy
|
||||
from templevel import TempLevel
|
||||
from box import BoundingBox
|
||||
from pymclevel.box import BoundingBox
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
|
@ -4,8 +4,8 @@ from os.path import join
|
||||
import time
|
||||
import unittest
|
||||
import numpy
|
||||
import nbt
|
||||
from test.templevel import TempLevel
|
||||
from pymclevel import nbt
|
||||
from templevel import TempLevel
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import itertools
|
||||
import os
|
||||
import unittest
|
||||
import mclevel
|
||||
from pymclevel import mclevel
|
||||
from templevel import TempLevel, mktemp
|
||||
from schematic import MCSchematic
|
||||
from box import BoundingBox
|
||||
from pymclevel.schematic import MCSchematic
|
||||
from pymclevel.box import BoundingBox
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import unittest
|
||||
from minecraft_server import MCServerChunkGenerator
|
||||
from pymclevel.minecraft_server import MCServerChunkGenerator
|
||||
from templevel import TempLevel
|
||||
from box import BoundingBox
|
||||
from pymclevel.box import BoundingBox
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from infiniteworld import SessionLockLost, MCInfdevOldLevel
|
||||
from pymclevel.infiniteworld import SessionLockLost, MCInfdevOldLevel
|
||||
from templevel import TempLevel
|
||||
import unittest
|
||||
|
||||
|
@ -3,7 +3,7 @@ import os
|
||||
from os.path import join
|
||||
import shutil
|
||||
import tempfile
|
||||
import mclevel
|
||||
from pymclevel import mclevel
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from test.templevel import TempLevel
|
||||
from templevel import TempLevel
|
||||
|
||||
def testPrimordialDesert():
|
||||
templevel = TempLevel("PrimordialDesert")
|
||||
|
@ -2,7 +2,7 @@ from StringIO import StringIO
|
||||
|
||||
__author__ = 'Rio'
|
||||
|
||||
import nbt as nbt
|
||||
import pymclevel.nbt as nbt
|
||||
|
||||
from timeit import timeit
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
from infiniteworld import MCInfdevOldLevel
|
||||
import mclevel
|
||||
from pymclevel.infiniteworld import MCInfdevOldLevel
|
||||
from pymclevel import mclevel
|
||||
from timeit import timeit
|
||||
|
||||
from test import templevel
|
||||
import templevel
|
||||
|
||||
#import logging
|
||||
#logging.basicConfig(level=logging.INFO)
|
||||
|
Reference in New Issue
Block a user