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:
David Vierra 2013-01-07 13:53:10 -10:00
parent 1e649dc2e7
commit 3095eacaa3
14 changed files with 28 additions and 29 deletions

View File

@ -1,5 +1,5 @@
rm _nbt.pyd rm _nbt.pyd
sh run_tests.sh test/nbt_test.py py.test test/nbt_test.py
python setup_nbt.py build_ext --inplace python setup.py build_ext --inplace
sh run_tests.sh test/nbt_test.py py.test test/nbt_test.py

View File

@ -1 +0,0 @@
PYTHONPATH=. py.test $@

View File

@ -4,12 +4,12 @@ import shutil
import unittest import unittest
import numpy import numpy
import mclevel from pymclevel import mclevel
from infiniteworld import MCInfdevOldLevel from pymclevel.infiniteworld import MCInfdevOldLevel
import nbt from pymclevel import nbt
from schematic import MCSchematic from pymclevel.schematic import MCSchematic
from box import BoundingBox from pymclevel.box import BoundingBox
import block_copy from pymclevel import block_copy
from templevel import mktemp, TempLevel from templevel import mktemp, TempLevel
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,4 +1,4 @@
from schematic import MCSchematic from pymclevel.schematic import MCSchematic
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,8 +1,8 @@
import unittest import unittest
from test.templevel import TempLevel from templevel import TempLevel
from box import BoundingBox from pymclevel.box import BoundingBox
from entity import Entity, TileEntity from pymclevel.entity import Entity, TileEntity
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,7 +1,7 @@
import unittest import unittest
import numpy import numpy
from templevel import TempLevel from templevel import TempLevel
from box import BoundingBox from pymclevel.box import BoundingBox
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -4,8 +4,8 @@ from os.path import join
import time import time
import unittest import unittest
import numpy import numpy
import nbt from pymclevel import nbt
from test.templevel import TempLevel from templevel import TempLevel
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,10 +1,10 @@
import itertools import itertools
import os import os
import unittest import unittest
import mclevel from pymclevel import mclevel
from templevel import TempLevel, mktemp from templevel import TempLevel, mktemp
from schematic import MCSchematic from pymclevel.schematic import MCSchematic
from box import BoundingBox from pymclevel.box import BoundingBox
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,7 +1,7 @@
import unittest import unittest
from minecraft_server import MCServerChunkGenerator from pymclevel.minecraft_server import MCServerChunkGenerator
from templevel import TempLevel from templevel import TempLevel
from box import BoundingBox from pymclevel.box import BoundingBox
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,4 +1,4 @@
from infiniteworld import SessionLockLost, MCInfdevOldLevel from pymclevel.infiniteworld import SessionLockLost, MCInfdevOldLevel
from templevel import TempLevel from templevel import TempLevel
import unittest import unittest

View File

@ -3,7 +3,7 @@ import os
from os.path import join from os.path import join
import shutil import shutil
import tempfile import tempfile
import mclevel from pymclevel import mclevel
__author__ = 'Rio' __author__ = 'Rio'

View File

@ -1,4 +1,4 @@
from test.templevel import TempLevel from templevel import TempLevel
def testPrimordialDesert(): def testPrimordialDesert():
templevel = TempLevel("PrimordialDesert") templevel = TempLevel("PrimordialDesert")

View File

@ -2,7 +2,7 @@ from StringIO import StringIO
__author__ = 'Rio' __author__ = 'Rio'
import nbt as nbt import pymclevel.nbt as nbt
from timeit import timeit from timeit import timeit

View File

@ -1,8 +1,8 @@
from infiniteworld import MCInfdevOldLevel from pymclevel.infiniteworld import MCInfdevOldLevel
import mclevel from pymclevel import mclevel
from timeit import timeit from timeit import timeit
from test import templevel import templevel
#import logging #import logging
#logging.basicConfig(level=logging.INFO) #logging.basicConfig(level=logging.INFO)