Use relative imports in tests

This commit is contained in:
Andrew Cassidy 2022-04-10 00:04:08 -07:00
parent b80a6d2229
commit b5aea803d5
5 changed files with 4 additions and 6 deletions

View File

@ -57,6 +57,7 @@ package-dir = { '' = '.' } # without this line, C++ source files get included in
[tool.cibuildwheel] [tool.cibuildwheel]
build = "cp{37,38,39,31*}-*" build = "cp{37,38,39,31*}-*"
skip = ["*cp37-musllinux*", "*musllinux_aarch64*", "cp{38,39,31*}-macosx_x86_64"] skip = ["*cp37-musllinux*", "*musllinux_aarch64*", "cp{38,39,31*}-macosx_x86_64"]
build-frontend = "build"
test-command = 'python -m unittest discover "{project}/tests/" --verbose' test-command = 'python -m unittest discover "{project}/tests/" --verbose'
test-extras = ["tests"] test-extras = ["tests"]
manylinux-x86_64-image = "manylinux2014" manylinux-x86_64-image = "manylinux2014"

View File

@ -1,4 +1,3 @@
import os.path import os.path
import unittest
images_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'images') images_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'images')

View File

@ -1,9 +1,7 @@
import unittest import unittest
import os.path
from parameterized import parameterized, parameterized_class from parameterized import parameterized, parameterized_class
import quicktex
from quicktex.s3tc.bc1 import BC1Block, BC1Texture, BC1Encoder, BC1Decoder from quicktex.s3tc.bc1 import BC1Block, BC1Texture, BC1Encoder, BC1Decoder
from tests.images import BC1Blocks, image_path from .images import BC1Blocks
from PIL import Image, ImageChops from PIL import Image, ImageChops
in_endpoints = ((253, 254, 255), (65, 70, 67)) # has some small changes that should encode the same in_endpoints = ((253, 254, 255), (65, 70, 67)) # has some small changes that should encode the same

View File

@ -1,7 +1,7 @@
import unittest import unittest
from parameterized import parameterized, parameterized_class from parameterized import parameterized, parameterized_class
from quicktex.s3tc.bc4 import BC4Block, BC4Texture, BC4Encoder, BC4Decoder from quicktex.s3tc.bc4 import BC4Block, BC4Texture, BC4Encoder, BC4Decoder
from tests.images import BC4Blocks from .images import BC4Blocks
from PIL import Image, ImageChops from PIL import Image, ImageChops

View File

@ -1,6 +1,6 @@
import unittest import unittest
import os.path import os.path
from tests.images import image_path from .images import image_path
from quicktex import RawTexture from quicktex import RawTexture
from PIL import Image from PIL import Image