diff --git a/.circleci/config.in.yml b/.circleci/config.in.yml index 043cfcd5..69ce1fc4 100644 --- a/.circleci/config.in.yml +++ b/.circleci/config.in.yml @@ -81,7 +81,7 @@ jobs: command: | export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python3 setup.py build_ext --inplace - - run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests + - run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests -t . - run: python3 setup.py bdist_wheel binary_linux_wheel: diff --git a/.circleci/config.yml b/.circleci/config.yml index eda1bcaa..20819cd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ jobs: command: | export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python3 setup.py build_ext --inplace - - run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests + - run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests -t . - run: python3 setup.py bdist_wheel binary_linux_wheel: diff --git a/INSTALL.md b/INSTALL.md index a1aa6d87..f6620514 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -147,10 +147,10 @@ After any necessary patching, you can go to "x64 Native Tools Command Prompt for cd pytorch3d python3 setup.py install ``` -After installing, verify whether all unit tests have passed + +After installing, you can run **unit tests** ``` -cd tests -python3 -m unittest discover -p *.py +python3 -m unittest discover -v -s tests -t . ``` # FAQ diff --git a/packaging/pytorch3d/meta.yaml b/packaging/pytorch3d/meta.yaml index 202f83ef..c8a61c78 100644 --- a/packaging/pytorch3d/meta.yaml +++ b/packaging/pytorch3d/meta.yaml @@ -47,7 +47,7 @@ test: - imageio commands: #pytest . - python -m unittest discover -v -s tests + python -m unittest discover -v -s tests -t . about: diff --git a/tests/implicitron/test_data_source.py b/tests/implicitron/test_data_source.py index bf41f693..4d664495 100644 --- a/tests/implicitron/test_data_source.py +++ b/tests/implicitron/test_data_source.py @@ -4,6 +4,7 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +import os import unittest from omegaconf import OmegaConf @@ -20,8 +21,9 @@ class TestDataSource(unittest.TestCase): self.maxDiff = None def test_one(self): - cfg = get_default_args(ImplicitronDataSource) - yaml = OmegaConf.to_yaml(cfg, sort_keys=False) - if DEBUG: - (DATA_DIR / "data_source.yaml").write_text(yaml) - self.assertEqual(yaml, (DATA_DIR / "data_source.yaml").read_text()) + with unittest.mock.patch.dict(os.environ, {"CO3D_DATASET_ROOT": ""}): + cfg = get_default_args(ImplicitronDataSource) + yaml = OmegaConf.to_yaml(cfg, sort_keys=False) + if DEBUG: + (DATA_DIR / "data_source.yaml").write_text(yaml) + self.assertEqual(yaml, (DATA_DIR / "data_source.yaml").read_text())