use unittest framework instead of pytest
parent
84d291003f
commit
bc68ecb5ab
|
@ -8,6 +8,8 @@ See LICENSE for the license information
|
||||||
Author: John Lambert (Python)
|
Author: John Lambert (Python)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import gtsam
|
import gtsam
|
||||||
|
@ -19,7 +21,10 @@ def vector3(x: float, y: float, z: float) -> np.ndarray:
|
||||||
return np.array([x, y, z], dtype=float)
|
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."""
|
"""Smokescreen to ensure LAGO can be imported and run on toy data stored in a g2o file."""
|
||||||
g2oFile = gtsam.findExampleDataFile("noisyToyGraph.txt")
|
g2oFile = gtsam.findExampleDataFile("noisyToyGraph.txt")
|
||||||
|
|
||||||
|
@ -32,3 +37,7 @@ def test_lago() -> None:
|
||||||
|
|
||||||
estimateLago: Values = gtsam.lago.initialize(graph)
|
estimateLago: Values = gtsam.lago.initialize(graph)
|
||||||
assert isinstance(estimateLago, Values)
|
assert isinstance(estimateLago, Values)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue