use unittest framework instead of pytest

release/4.3a0
John Lambert 2021-10-22 01:18:51 -04:00 committed by GitHub
parent 84d291003f
commit bc68ecb5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 10 deletions

View File

@ -8,6 +8,8 @@ See LICENSE for the license information
Author: John Lambert (Python)
"""
import unittest
import numpy as np
import gtsam
@ -19,7 +21,10 @@ def vector3(x: float, y: float, z: float) -> np.ndarray:
return np.array([x, y, z], dtype=float)
def test_lago() -> None:
class TestLago(unittest.TestCase):
"""Test selected LAGO methods."""
def test_initialize(self) -> None:
"""Smokescreen to ensure LAGO can be imported and run on toy data stored in a g2o file."""
g2oFile = gtsam.findExampleDataFile("noisyToyGraph.txt")
@ -32,3 +37,7 @@ def test_lago() -> None:
estimateLago: Values = gtsam.lago.initialize(graph)
assert isinstance(estimateLago, Values)
if __name__ == "__main__":
unittest.main()