summaryrefslogtreecommitdiff
path: root/AlgoDesignAndTechniqueEdxPython/tests/points_segmentsTest.py
blob: 1a0f229c0a7858d3d8bbd9aa343e53da7b044c04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'''
Created on Dec 9, 2018

@author: haidong
'''
import unittest

from sources.points_segments import fast_count_segments

class Test(unittest.TestCase):


    def testName(self):
        starts = [0, 7]
        ends = [5, 10]
        points = [1, 6, 11]
        results = [1, 0, 0]
        self.assertSequenceEqual(results, fast_count_segments(starts, ends, points))
        


if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()