Skip to content

Commit

Permalink
Fixes for CI build
Browse files Browse the repository at this point in the history
- Add psutil install on azure
- Fix file deletion on windows
  • Loading branch information
ihnorton committed May 17, 2019
1 parent fd9576b commit f67d094
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
12 changes: 10 additions & 2 deletions tiledb/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand All @@ -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

6 changes: 3 additions & 3 deletions tiledb/tests/test_libtiledb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f67d094

Please sign in to comment.