Skip to content

Commit c7afb3e

Browse files
committed
Adding test to read Manifold.
1 parent 9a60d11 commit c7afb3e

4 files changed

Lines changed: 45 additions & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ class TwisterCoreExtensionSpec:
830830
'snappy/raytracing/shaders' : ['*.glsl', '*.png'],
831831
'snappy/raytracing/zoom_slider': ['*.png', '*.gif'],
832832
'snappy/raytracing/zoom_slider': ['*.png'],
833-
'snappy/tests/files': ['*.orb'],
833+
'snappy/tests/files': ['*.orb', '*.tri'],
834834
'snappy/dev/vericlosed/orb' : ['orb_solution_for_snappea_finite_triangulation_mac'],
835835
},
836836
package_dir = {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
% Triangulation
2+
m004
3+
geometric_solution 2.02988321
4+
oriented_manifold
5+
CS_unknown
6+
7+
1 0
8+
torus 0.000000000000 0.000000000000
9+
10+
2
11+
1 1 1 1
12+
0132 1230 2310 2103
13+
0 0 0 0
14+
0 0 0 0 0 0 0 0 -1 1 0 0 0 0 0 0
15+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16+
0 -1 0 1 1 0 -1 0 0 1 0 -1 -1 0 1 0
17+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18+
0.500000000000 0.866025403784
19+
20+
0 0 0 0
21+
0132 3201 3012 2103
22+
0 0 0 0
23+
0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0
24+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
25+
0 -1 0 1 -1 0 1 0 1 0 0 -1 0 1 -1 0
26+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
27+
0.500000000000 0.866025403784
28+

src/snappy/tests/io.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
3+
>>> M = Manifold(os.path.join(test_files_paths[0], 'example_m004.tri'))
4+
>>> M.triangulation_isosig()
5+
'cPcbbbiht_BaCB'
6+
7+
"""
8+
9+
if not __doc__:
10+
raise Exception("doc string with tests was not recognized.")
11+
12+
import os
13+
from .. import Manifold
14+
from .files import __path__ as test_files_paths

src/snappy/tests/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from snappy import testing
22
import snappy.tests
3+
import snappy.tests.io
34
import snappy.tests.orb
45

56
modules = [
7+
snappy.tests.io,
68
snappy.tests.orb
79
]
810

0 commit comments

Comments
 (0)