Skip to content

Commit

Permalink
Merge pull request #344 from kubilus1/pytestbuild
Browse files Browse the repository at this point in the history
Try to include pytest
  • Loading branch information
kubilus1 authored Aug 27, 2023
2 parents 13ee918 + d513934 commit 15770a6
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions autoortho/autoortho.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import platform
import argparse
import threading
import tempfile

import aoconfig
import aostats
Expand All @@ -22,7 +23,6 @@
log = logging.getLogger(__name__)

import geocoder
import pytest
import ctypes


Expand Down Expand Up @@ -62,12 +62,17 @@ def diagnose(CFG):
if not ret:
failed = True

ret = pytest.main([
"-vv",
"autoortho/test_getortho.py::test_maptype_chunk"
])
if ret != 0:
failed = True
log.info(f"Checking maptypes:")
import getortho
for maptype in CFG.autoortho.maptypes:
with tempfile.TemporaryDirectory() as tmpdir:
c = getortho.Chunk(2176, 3232, maptype, 13, cache_dir=tmpdir)
ret = c.get()
if ret:
log.info(f" Maptype: {maptype} OK!")
else:
log.warning(f" Maptype: {maptype} FAILED!")
failed = True

log.info("------------------------------------")
if failed:
Expand Down

0 comments on commit 15770a6

Please sign in to comment.