moved usage logging tests out of ui_tests directory. #673.

This commit is contained in:
davemfish 2021-10-04 14:56:16 -04:00
parent 947a4f95b3
commit d3c278beb4
3 changed files with 7 additions and 7 deletions

View File

@ -27,11 +27,11 @@ import qtawesome
import natcap.invest
from . import inputs
from . import usage
from . import execution
from .. import cli
from .. import utils
from .. import datastack
from .. import usage
from .. import utils
from .. import validation
LOGGER = logging.getLogger(__name__)

View File

@ -20,7 +20,7 @@ from osgeo import osr
import natcap.invest
import pygeoprocessing
from .. import utils
from . import utils
ENCODING = sys.getfilesystemencoding()
LOGGER = logging.getLogger(__name__)

View File

@ -14,8 +14,8 @@ import numpy
import numpy.testing
class ModelLoggingTests(unittest.TestCase):
"""Tests for the InVEST model logging framework."""
class UsageLoggingTests(unittest.TestCase):
"""Tests for the InVEST usage logging framework."""
def setUp(self):
"""Initalize a workspace."""
@ -28,7 +28,7 @@ class ModelLoggingTests(unittest.TestCase):
def test_bounding_boxes(self):
"""Usage logger test that we can extract bounding boxes."""
from natcap.invest import utils
from natcap.invest.ui import usage
from natcap.invest import usage
srs = osr.SpatialReference()
srs.ImportFromEPSG(32731) # WGS84 / UTM zone 31s
@ -81,7 +81,7 @@ class ModelLoggingTests(unittest.TestCase):
numpy.testing.assert_allclose(
bb_inter, [-87.234108, -85.526151, -87.233424, -85.526205])
numpy.testing.assert_allclose(
bb_union, [-87.237771, -85.526132, -87.23321 , -85.526491])
bb_union, [-87.237771, -85.526132, -87.23321, -85.526491])
# Verify that no errors were raised in calculating the bounding boxes.
self.assertTrue('ERROR' not in open(output_logfile).read(),