diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cfbf0ade25..35e00249b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ steps: architecture: 'x64' - script: | - python -m pip install --upgrade pip setuptools wheel numpy tox setuptools-scm cython + python -m pip install --upgrade pip setuptools wheel numpy tox setuptools-scm cython psutil displayName: 'Install dependencies' - script: | diff --git a/tiledb/tests/common.py b/tiledb/tests/common.py index af594cf91e..c2acaf85e6 100644 --- a/tiledb/tests/common.py +++ b/tiledb/tests/common.py @@ -4,9 +4,11 @@ import os import shutil import tempfile +import traceback from unittest import TestCase class DiskTestCase(TestCase): + pathmap = dict() def setUp(self): prefix = 'tiledb-' + self.__class__.__name__ @@ -20,8 +22,14 @@ def tearDown(self): except OSError as exc: print("test '{}' error deleting '{}'".format(self.__class__.__name__, dirpath)) - raise + print("registered paths and originating functions:") + for path,frame in self.pathmap.items(): + print(" '{}' <- '{}'".format(path,frame)) + raise exc def path(self, path): - return os.path.abspath(os.path.join(self.rootdir, path)) + out = os.path.abspath(os.path.join(self.rootdir, path)) + frame = traceback.extract_stack(limit=2)[-2][2] + self.pathmap[out] = frame + return out diff --git a/tiledb/tests/test_libtiledb.py b/tiledb/tests/test_libtiledb.py index cb8c94377d..bead3d02cc 100644 --- a/tiledb/tests/test_libtiledb.py +++ b/tiledb/tests/test_libtiledb.py @@ -1559,9 +1559,9 @@ def test_pickle_roundtrip(self): with io.BytesIO() as buf, tiledb.DenseArray(uri) as V: pickle.dump(V, buf) buf.seek(0) - V2 = pickle.load(buf) - # make sure anonymous view pickles and round-trips - assert_array_equal(V, V2) + with pickle.load(buf) as V2: + # make sure anonymous view pickles and round-trips + assert_array_equal(V, V2) def test_pickle_with_config(self): import io, pickle