Fix tests for OSS

Summary: New paths.

Reviewed By: patricklabatut

Differential Revision: D36734929

fbshipit-source-id: c0ce7ee9145ddca07ef3758d31cc3c261b088e7d
This commit is contained in:
Jeremy Reizenstein 2022-06-01 13:52:26 -07:00 committed by Facebook GitHub Bot
parent 5b74a2cc27
commit 5cd70067e2
5 changed files with 13 additions and 11 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -47,7 +47,7 @@ test:
- imageio
commands:
#pytest .
python -m unittest discover -v -s tests
python -m unittest discover -v -s tests -t .
about:

View File

@ -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,6 +21,7 @@ class TestDataSource(unittest.TestCase):
self.maxDiff = None
def test_one(self):
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: