Skip to content

Move tests so that they don't get bundled #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install:
- pip install --force-reinstall pylint==1.9.2

script:
- pytest adafruit_imageload
- python -m pytest
- pylint adafruit_imageload/**
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-imageload --library_location .
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@

import os
from unittest import TestCase
from .. import load
from adafruit_imageload import load
from .displayio_shared_bindings import Bitmap_C_Interface, Palette_C_Interface


class TestBmpIndexedLoad(TestCase):
def test_order_bgra_to_rgba(self):
test_file = os.path.join(
os.path.dirname(__file__), "..", "..", "examples", "images", "4bit.bmp"
os.path.dirname(__file__), "..", "examples", "images", "4bit.bmp"
)

bitmap, palette = load(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import os
from io import BytesIO
from unittest import TestCase
from .. import pnm
from ..pnm.pbm_binary import iterbits, reverse
from adafruit_imageload import pnm
from adafruit_imageload.pnm.pbm_binary import iterbits, reverse
from .displayio_shared_bindings import Bitmap_C_Interface, Palette_C_Interface


Expand All @@ -50,7 +50,6 @@ def test_load_works_p1_ascii(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p1_mono_ascii.pbm",
Expand Down Expand Up @@ -86,7 +85,6 @@ def test_load_works_p4_binary(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p4_mono_binary.pbm",
Expand All @@ -108,7 +106,6 @@ def test_load_works_p4_binary_high_res(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p4_mono_large.pbm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"""
import os
from unittest import TestCase
from .. import pnm
from adafruit_imageload import pnm
from .displayio_shared_bindings import Bitmap_C_Interface, Palette_C_Interface


Expand All @@ -37,7 +37,6 @@ def test_load_works_p2_ascii(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p2_ascii.pgm",
Expand All @@ -59,7 +58,6 @@ def test_load_works_p5_binary(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p5_binary.pgm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import os
from io import BytesIO
from unittest import TestCase
from .. import pnm
from ..pnm.ppm_ascii import read_three_colors
from adafruit_imageload import pnm
from adafruit_imageload.pnm.ppm_ascii import read_three_colors
from .displayio_shared_bindings import Bitmap_C_Interface, Palette_C_Interface


Expand All @@ -39,7 +39,6 @@ def test_load_works_p3_ascii(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p3_rgb_ascii.ppm",
Expand All @@ -63,7 +62,6 @@ def test_load_works_p6_binary(self):
test_file = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"examples",
"images",
"netpbm_p6_binary.ppm",
Expand Down