mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-19 05:40:34 +08:00
Fix tests for OSS
Summary: New paths. Reviewed By: patricklabatut Differential Revision: D36734929 fbshipit-source-id: c0ce7ee9145ddca07ef3758d31cc3c261b088e7d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5b74a2cc27
commit
5cd70067e2
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user