From f764c5afa58afcaa55c96522bd0f2ff505718369 Mon Sep 17 00:00:00 2001 From: jack-parsons <jack.parsons.uk@icloud.com> Date: Thu, 25 Jul 2019 18:12:00 +0100 Subject: [PATCH] Adding smoothing test --- AmpScan/smooth.py | 2 +- tests/{test_registration.py => test_smoothing.py} | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) rename tests/{test_registration.py => test_smoothing.py} (70%) diff --git a/AmpScan/smooth.py b/AmpScan/smooth.py index ff6bb37..2131723 100644 --- a/AmpScan/smooth.py +++ b/AmpScan/smooth.py @@ -52,7 +52,7 @@ class smoothMixin(object): def smoothValues(self, n=1): """ Function to apply a simple laplacian smooth to the values array. - Identical to the vertex smoothing expect it applies the smoothing + Identical to the vertex smoothing except it applies the smoothing to the values Parameters diff --git a/tests/test_registration.py b/tests/test_smoothing.py similarity index 70% rename from tests/test_registration.py rename to tests/test_smoothing.py index 25f1f81..2db6786 100644 --- a/tests/test_registration.py +++ b/tests/test_smoothing.py @@ -1,12 +1,12 @@ """ -Testing suite for the core module +Testing suite for the registration module """ import unittest from util import get_path -class TestRegistration(unittest.TestCase): +class TestSmoothing(unittest.TestCase): ACCURACY = 5 # The number of decimal places to value accuracy for - needed due to floating point inaccuracies def setUp(self): @@ -17,3 +17,7 @@ class TestRegistration(unittest.TestCase): stl_path = get_path("stl_file.stl") self.amp = AmpObject(stl_path) + def test_smoothing(self): + # Test that smoothing runs + self.amp.smoothValues() + -- GitLab