Skip to content

Commit e948389

Browse files
committed
tests updates
1 parent 420085a commit e948389

12 files changed

+23
-55
lines changed

tests/test_compatibility.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Tests geomdl.compatibility module. Requires "pytest" to run.
74
"""

tests/test_convert.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Tests B-Spline to NURBS conversions. Requires "pytest" to run.
74
"""

tests/test_curve.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018-2019 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package
52
63
Requires "pytest" to run.
74
"""
@@ -12,7 +9,6 @@
129
from geomdl import helpers
1310
from geomdl import convert
1411
from geomdl import operations
15-
from geomdl import linalg
1612

1713
GEOMDL_DELTA = 0.001
1814

tests/test_evaluate.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Requires "pytest" to run.
74
"""

tests/test_helpers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018-2019 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Requires "pytest" to run.
74
"""

tests/test_linalg.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Tests geomdl.linalg module. Requires "pytest" to run.
74
"""

tests/test_ray.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import pytest
1+
"""Tests for the NURBS-Python package.
2+
3+
Tests geomdl.ray module. Requires "pytest" to run.
4+
"""
25

36
from geomdl import ray
47
from geomdl.ray import Ray, RayIntersection

tests/test_read_write.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Tests file I/O operations. Requires "pytest" to run.
74
"""

tests/test_surface.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018-2019 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Requires "pytest" to run.
74
"""
@@ -128,11 +125,11 @@ def test_bspline_surface_deriv(spline_surf):
128125
der1 = spline_surf.derivatives(u=0.35, v=0.35, order=2)
129126
spline_surf.evaluator = evaluators.SurfaceEvaluator2()
130127
der2 = spline_surf.derivatives(u=0.35, v=0.35, order=2)
131-
for k in range(0, 3):
132-
for l in range(0, 3 - k):
133-
assert abs(der1[k][l][0] - der2[k][l][0]) < GEOMDL_DELTA
134-
assert abs(der1[k][l][1] - der2[k][l][1]) < GEOMDL_DELTA
135-
assert abs(der1[k][l][2] - der2[k][l][2]) < GEOMDL_DELTA
128+
for ki in range(0, 3):
129+
for li in range(0, 3 - ki):
130+
assert abs(der1[ki][li][0] - der2[ki][li][0]) < GEOMDL_DELTA
131+
assert abs(der1[ki][li][1] - der2[ki][li][1]) < GEOMDL_DELTA
132+
assert abs(der1[ki][li][2] - der2[ki][li][2]) < GEOMDL_DELTA
136133

137134

138135
@mark.parametrize(

tests/test_surfgen.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Tests for the NURBS-Python package
3-
Released under The MIT License. See LICENSE file for details.
4-
Copyright (c) 2018 Onur Rauf Bingol
1+
"""Tests for the NURBS-Python package.
52
63
Tests geomdl.GPGen module. Requires "pytest" to run.
74
"""
@@ -203,7 +200,7 @@ def test_grid_weight6(gridw):
203200
],
204201
]
205202

206-
gen_cache_var = gridw.grid
203+
gridw.grid
207204

208205
# this should pull up the grid from the cache
209206
assert gridw.grid == result

0 commit comments

Comments
 (0)