diff --git a/.gitignore b/.gitignore index aa16849f7b..b01921b39f 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,9 @@ work_dirs/ # Profile *.prof +# lmdb +*.mdb + # unignore some data file in tests/data !tests/data/**/*.pkl !tests/data/**/*.pkl.json diff --git a/tests/data/lfb/lmdb/data.mdb b/tests/data/lfb/lmdb/data.mdb deleted file mode 100644 index ca41b91910..0000000000 Binary files a/tests/data/lfb/lmdb/data.mdb and /dev/null differ diff --git a/tests/data/lfb/lmdb/lock.mdb b/tests/data/lfb/lmdb/lock.mdb deleted file mode 100644 index 7a258ca329..0000000000 Binary files a/tests/data/lfb/lmdb/lock.mdb and /dev/null differ diff --git a/tests/test_models/test_head.py b/tests/test_models/test_head.py index c06746188c..3ad7cbf013 100644 --- a/tests/test_models/test_head.py +++ b/tests/test_models/test_head.py @@ -1,4 +1,5 @@ import os.path as osp +import tempfile from unittest.mock import Mock, patch import numpy as np @@ -312,8 +313,9 @@ def test_tsm_head(): def test_lfb_infer_head(): """Test layer construction, attributes and forward function in lfb infer head.""" - lfb_infer_head = LFBInferHead( - lfb_prefix_path='temp_dir', use_half_precision=True) + with tempfile.TemporaryDirectory() as tmpdir: + lfb_infer_head = LFBInferHead( + lfb_prefix_path=tmpdir, use_half_precision=True) lfb_infer_head.init_weights() st_feat_shape = (3, 16, 1, 8, 8)