-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_circle_of_distance.py
32 lines (24 loc) · 1.09 KB
/
test_circle_of_distance.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import unittest
import numpy as np
import circle_of_distance as cs
from config_sedimentdrift import MartiniConf
class TestCircleOfDistance(unittest.TestCase):
def setUp(self):
super(TestCircleOfDistance, self).setUp()
self.ccs = cs.Circle_of_distance()
self.config_sedimentdrift = MartiniConf()
def tearDown(self) -> None:
super(TestCircleOfDistance, self).tearDown()
self.config_sedimentdrift = None
self.ccs = None
def test_setup_correct(self):
self.assertIsInstance(self.config_sedimentdrift, MartiniConf)
self.assertIsInstance(self.ccs, cs.Circle_of_distance)
def test_circle_of_distribution(self):
X, Y = self.ccs.create_circle_with_radius(self.config_sedimentdrift.st_lats[0],
self.config_sedimentdrift.st_lons[0],
self.config_sedimentdrift.release_radius)
self.assertIsNotNone(X)
self.assertIsNotNone(Y)
self.assertEqual(np.shape(X), (360,))
self.assertEqual(np.shape(Y), (360,))