Commit f237fd46 authored by SETaratukhina's avatar SETaratukhina
Browse files

Update test.py

parent 88550f40
Pipeline #3921 failed with stage
in 4 seconds
......@@ -22,13 +22,13 @@ class test(unittest.TestCase):
self.assertEqual(round(missle.y, 2), -93.45)
def testRlsPeleng(self):
air1 = TAircraft(200, 50, 50, math.pi / 3)
air2 = TAircraft(200, 60, 60, math.pi / 6)
air1 = TAircraft(20, 10, 25, math.pi / 3)
air2 = TAircraft(2000, 2000, 200, math.pi / 6)
mis1 = TMissle(1000, 10, -10, math.pi / 4, 30)
mis2 = TMissle(1000, 100, 150, math.pi / 4, 30)
mis1 = TMissle(100, 50, 50, math.pi / 4, 30)
mis2 = TMissle(1100, 2100, 150, math.pi / 4, 30)
Rls = RLS(50, 100, 1000)
Rls = RLS(50, 100, 900)
Rls.Targets.append(air1)
Rls.Targets.append(air2)
Rls.Targets.append(mis1)
......@@ -40,16 +40,10 @@ class test(unittest.TestCase):
for line in f:
lines.append(line)
f.close()
true_lines = ['0.1; Aircraft #1; D = 475.42512792323026; Az = 1.2782078793302334\n',
'0.1; Aircraft #2; D = 480.19721022253833; Az = 0.687805100917794\n',
'0.1; Missle #1; D = 998.5335823515045; Az = -0.044676900377693035\n',
'0.2; Aircraft #1; D = 943.465660043936; Az = 1.1634512982485217\n',
'0.3; Missle #1; D = 972.9064248219566; Az = -0.07545850062851994\n',
'0.4; Missle #1; D = 907.1337221989091; Az = -0.1691878100590082\n',
'0.5; Missle #1; D = 822.114416066153; Az = -0.3423586811055799\n',
'0.6; Missle #1; D = 749.7787467061987; Az = -0.6283903712185257\n',
'0.7; Missle #1; D = 747.3045172925204; Az = -1.0212847158511866\n',
'0.8; Missle #1; D = 872.6102282527802; Az = -1.410419725639589\n']
true_lines = ['0.1; Aircraft #1; D = 334.0743692766258; Az = 0.9795746556124477\n',
'0.1; Missle #1; D = 514.929470155641; Az = 0.8501314037713014\n',
'0.2; Aircraft #1; D = 574.4377296150348; Az = 1.006690412224313\n',
'0.3; Aircraft #1; D = 814.9350053796323; Az = 1.01828854721129\n']
self.assertEqual(lines, true_lines)
print('All tests passed correctly!')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment