Esempio n. 1
0
 def test_case_1st_quadrant(self):
     pnt = point.POINT(1,1)
     result = point.quadrant(pnt) 
     expected = 1
     self.assertEqual(result,expected)
Esempio n. 2
0
 def test_case_3st_quadrant(self):
     pnt = point.POINT(-1,-1)
     result = point.quadrant(pnt) 
     expected = 3
     self.assertEqual(result,expected)
Esempio n. 3
0
 def test_case_on_axis(self):
     pnt = point.POINT(0,0)
     result = point.quadrant(pnt) 
     expected = "point falls on axis."
     self.assertEqual(result,expected)
Esempio n. 4
0
def get_topchars():
    pnt = point.POINT(int(request.args.get("x")), int(request.args.get("y")))
    return jsonify({'Quadrant': point.quadrant(pnt)})