summaryrefslogtreecommitdiff
path: root/src/python/test/test_off.py
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2023-01-20 13:47:30 +0100
committerGard Spreemann <gspr@nonempty.org>2023-01-20 13:47:30 +0100
commit688cbc5c29d0a6aaf233eee185a06cef5cb2e745 (patch)
treecb13b84e9f7cddea48b903d24014f63d1dfda7e3 /src/python/test/test_off.py
parent2b3caf86fc6500a9fca9e9085012a2315fbbac3b (diff)
parented492f09ca3c9d7cd972bbbbec37f680cd624fbe (diff)
Merge tag 'tags/gudhi-release-3.7.1' into dfsg/latestdfsg/latest
Diffstat (limited to 'src/python/test/test_off.py')
-rw-r--r--src/python/test/test_off.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/python/test/test_off.py b/src/python/test/test_off.py
new file mode 100644
index 00000000..aea1941b
--- /dev/null
+++ b/src/python/test/test_off.py
@@ -0,0 +1,21 @@
+""" This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
+ See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
+ Author(s): Marc Glisse
+
+ Copyright (C) 2022 Inria
+
+ Modification(s):
+ - YYYY/MM Author: Description of the modification
+"""
+
+import gudhi as gd
+import numpy as np
+import pytest
+
+
+def test_off_rw():
+ for dim in range(2, 6):
+ X = np.random.rand(123, dim)
+ gd.write_points_to_off_file("rand.off", X)
+ Y = gd.read_points_from_off_file("rand.off")
+ assert Y == pytest.approx(X)