forked from zoeyuchao/habitat-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_habitat_example.py
59 lines (44 loc) · 1.68 KB
/
test_habitat_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import pytest
import habitat
from examples import (
new_actions,
register_new_sensors_and_measures,
shortest_path_follower_example,
visualization_examples,
)
from examples.example import example
from habitat.datasets.pointnav.pointnav_dataset import PointNavDatasetV1
def test_readme_example():
if not PointNavDatasetV1.check_config_paths_exist(
config=habitat.get_config().DATASET
):
pytest.skip("Please download Habitat test data to data folder.")
example()
def test_visualizations_example():
if not PointNavDatasetV1.check_config_paths_exist(
config=habitat.get_config().DATASET
):
pytest.skip("Please download Habitat test data to data folder.")
visualization_examples.main()
def test_shortest_path_follower_example():
if not PointNavDatasetV1.check_config_paths_exist(
config=habitat.get_config().DATASET
):
pytest.skip("Please download Habitat test data to data folder.")
shortest_path_follower_example.main()
def test_register_new_sensors_and_measures():
if not PointNavDatasetV1.check_config_paths_exist(
config=habitat.get_config().DATASET
):
pytest.skip("Please download Habitat test data to data folder.")
register_new_sensors_and_measures.main()
def test_new_actions():
if not PointNavDatasetV1.check_config_paths_exist(
config=habitat.get_config().DATASET
):
pytest.skip("Please download Habitat test data to data folder.")
new_actions.main()