diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ebbf4f5..39a3634 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -19,7 +19,6 @@ jobs: # Whether to checkout submodules: `true` to checkout submodules or `recursive` to # recursively checkout submodules. submodules: 'true' - lfs: 'true' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 @@ -42,6 +41,9 @@ jobs: python -m pip install --upgrade pip python -m pip install flake8 ninja setuptools-scm Pillow click nose parameterized + - name: Install test images + run: git clone https://git.pileof.rocks/drewcassidy/quicktex-test-images.git tests/images + - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names @@ -58,7 +60,7 @@ jobs: build: needs: test if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - + runs-on: ${{ matrix.os }} env: MACOSX_DEPLOYMENT_TARGET: 10.15 diff --git a/.gitignore b/.gitignore index a3cc259..67b758e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ docs/_build/ #mypy out +# Test images +tests/images/ + # IDEs **/.idea diff --git a/.gitmodules b/.gitmodules index ee2b235..aecfec5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,3 @@ path = extern/pybind11 url = https://github.com/pybind/pybind11.git branch = stable -[submodule "tests/images"] - path = tests/images - url = https://git.pileof.rocks/drewcassidy/python-rgbcx-images.git - commit = 0ade526dd1070e6f5b43e0bd58b26828abff86b7 diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..2030df7 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,9 @@ +import os.path + +# Some checks to run before tests can begin +images_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'images') + +assert os.path.isdir(images_path), 'test images repo not present' +assert os.path.isfile(os.path.join(images_path, '__init__.py')), 'images __init__.py not present, is the test image repo present?' +bp_size = os.path.getsize(os.path.join(images_path, 'Boilerplate.png')) +assert bp_size == 955989, 'Boilerplate.png is the wrong size, is the test image repo checked out with LFS enabled?' diff --git a/tests/images b/tests/images deleted file mode 160000 index bd0689e..0000000 --- a/tests/images +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bd0689ec4b841440713c3d8ff94fde71ddd4417f diff --git a/tests/test_install.py b/tests/test_install.py index 0050b7a..2eb704c 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -13,10 +13,10 @@ def test_images(): images_path = os.path.join(tests_path, 'images') - assert os.path.isdir(images_path), 'images directory/submodule not present' - assert os.path.isfile(os.path.join(images_path, '__init__.py')), 'images __init__.py not present, is the submodule checked out?' + assert os.path.isdir(images_path), 'test images repo not present. run "git clone https://git.pileof.rocks/drewcassidy/quicktex-test-images.git tests/images" to download them' + assert os.path.isfile(os.path.join(images_path, '__init__.py')), 'images __init__.py not present, is the test image repo present?' bp_size = os.path.getsize(os.path.join(images_path, 'Boilerplate.png')) - assert bp_size == 955989, 'Boilerplate.png is the wrong size, is the submodule checked out with LFS enabled?' + assert bp_size == 955989, 'Boilerplate.png is the wrong size, is the test image repo checked out with LFS enabled?' def test_version():