Skip to content

Commit

Permalink
test added
Browse files Browse the repository at this point in the history
  • Loading branch information
RBhupi committed Aug 16, 2024
1 parent 3f96e4f commit 66a0092
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/test_calculate_pt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import unittest
from MobotixScan import calculate_pt

class TestCalculatePt(unittest.TestCase):
def test_case_1(self):
sdir = 28
pdir = "SES,NEG"
expected = '21, 16'
self.assertEqual(calculate_pt(sdir, pdir), expected)

def test_invalid_direction(self):
with self.assertRaises(ValueError) as context:
calculate_pt('GFH', '1')

if __name__ == '__main__':
unittest.main()

0 comments on commit 66a0092

Please sign in to comment.