ソースを参照

fix tests for dev mode

Bastien Sevajol 9 年 前
コミット
9a6bb66e6b
共有2 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 1 1
      intelligine/synergy/object/ant/Ant.py
  2. 1 1
      intelligine/tests/simulation/bypass/TestByPass.py

+ 1 - 1
intelligine/synergy/object/ant/Ant.py ファイルの表示

@@ -24,7 +24,7 @@ class Ant(Bug):
24 24
                                                            COL_FIGHTER])
25 25
         self._carried = None
26 26
         #  TODO: Comme pour lorsque une action put est faite, lancer un algo de choix de la mission a suivre.
27
-        if random.choice([0, 1]):
27
+        if random.choice([1, 0]):
28 28
             self._brain.switch_to_mode(MODE_EXPLO)
29 29
         else:
30 30
             self._brain.switch_to_mode(MODE_NURSE)

+ 1 - 1
intelligine/tests/simulation/bypass/TestByPass.py ファイルの表示

@@ -6,7 +6,7 @@ from intelligine.tests.src.simulation.SimpleTestWorld1Simulation import SimpleTe
6 6
 class TestByPass(SimpleTestWorld1Simulation):
7 7
 
8 8
     _ant_move_history = []
9
-    _assert_ant_move_history = [(0, 21, 20), (0, 21, 19), (0, 21, 18), (0, 21, 17), (0, 21, 16), (0, 21, 15), (0, 21, 14), (0, 21, 14), (0, 22, 13), (0, 23, 12), (0, 24, 11), (0, 24, 11), (0, 24, 11), (0, 24, 11), (0, 24, 11), (0, 23, 11), (0, 22, 11), (0, 21, 11), (0, 21, 11), (0, 21, 11), (0, 21, 11), (0, 21, 11), (0, 22, 12), (0, 23, 13), (0, 24, 14), (0, 24, 14), (0, 24, 14), (0, 24, 14), (0, 24, 14), (0, 23, 15), (0, 22, 16), (0, 21, 17), (0, 21, 17), (0, 21, 17), (0, 21, 17), (0, 21, 17), (0, 21, 16), (0, 21, 15), (0, 21, 14), (0, 21, 13), (0, 21, 12), (0, 21, 11), (0, 21, 10), (0, 21, 9), (0, 21, 8), (0, 21, 7), (0, 21, 6), (0, 21, 5), (0, 21, 4), (0, 21, 3), (0, 22, 2), (0, 23, 1), (0, 23, 1), (0, 23, 1), (0, 23, 1), (0, 23, 1), (0, 22, 1), (0, 21, 1), (0, 20, 1), (0, 19, 1), (0, 18, 1), (0, 17, 1), (0, 16, 1), (0, 15, 1), (0, 14, 1), (0, 13, 1), (0, 12, 1), (0, 11, 1), (0, 10, 1), (0, 9, 1), (0, 8, 2), (0, 7, 2), (0, 6, 3), (0, 5, 4), (0, 4, 5), (0, 3, 5), (0, 4, 6), (0, 5, 7), (0, 6, 8), (0, 7, 9), (0, 8, 10), (0, 9, 11), (0, 10, 12), (0, 11, 13), (0, 11, 12), (0, 11, 11), (0, 11, 10), (0, 11, 9), (0, 11, 8), (0, 11, 7), (0, 12, 7), (0, 13, 7), (0, 14, 7), (0, 15, 7), (0, 16, 7), (0, 17, 7), (0, 18, 7), (0, 19, 7), (0, 20, 7), (0, 21, 7), (0, 21, 8), (0, 21, 9), (0, 21, 10), (0, 21, 11), (0, 21, 12), (0, 21, 13), (0, 21, 14), (0, 21, 15), (0, 21, 16), (0, 21, 17), (0, 21, 18), (0, 21, 19), (0, 21, 20), (0, 20, 21), (0, 19, 22), (0, 18, 23), (0, 17, 24), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 17, 25), (0, 18, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 18, 25), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 18, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 18, 25), (0, 17, 24), (0, 17, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 25), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 25), (0, 17, 24), (0, 18, 23), (0, 18, 23), (0, 19, 22), (0, 20, 21), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 19), (0, 21, 18), (0, 21, 17), (0, 21, 16), (0, 21, 15), (0, 21, 14), (0, 21, 13), (0, 21, 12), (0, 21, 11), (0, 21, 10), (0, 21, 9), (0, 21, 8), (0, 20, 7), (0, 19, 7), (0, 18, 7), (0, 17, 7), (0, 16, 7), (0, 15, 7), (0, 14, 7), (0, 13, 7), (0, 12, 7), (0, 11, 8), (0, 11, 9), (0, 11, 10), (0, 11, 11), (0, 10, 12), (0, 9, 11), (0, 8, 10), (0, 7, 9), (0, 6, 9), (0, 5, 9), (0, 4, 10), (0, 3, 11), (0, 2, 12), (0, 1, 13), (0, 1, 13), (0, 1, 13), (0, 1, 13), (0, 1, 13), (0, 1, 13), (0, 1, 13), (0, 1, 13), (0, 1, 12), (0, 1, 11), (0, 1, 10), (0, 1, 9), (0, 2, 8), (0, 2, 7), (0, 2, 6), (0, 3, 7), (0, 4, 8), (0, 5, 9), (0, 6, 10), (0, 7, 11), (0, 8, 12), (0, 9, 13), (0, 10, 14), (0, 11, 15), (0, 12, 16), (0, 13, 17), (0, 14, 17), (0, 13, 17), (0, 12, 17), (0, 11, 17), (0, 10, 17), (0, 9, 17), (0, 8, 17), (0, 7, 17), (0, 6, 17), (0, 5, 17), (0, 4, 17), (0, 3, 17), (0, 2, 17), (0, 1, 17), (0, 1, 16), (0, 1, 15), (0, 1, 14), (0, 1, 13), (0, 1, 12), (0, 1, 11), (0, 1, 10), (0, 1, 9), (0, 1, 8), (0, 1, 7), (0, 1, 6), (0, 1, 5), (0, 1, 4), (0, 1, 3), (0, 1, 2), (0, 1, 1), (0, 2, 1), (0, 3, 1), (0, 4, 1), (0, 5, 1), (0, 6, 1), (0, 7, 1), (0, 8, 1), (0, 9, 1), (0, 10, 1), (0, 11, 1), (0, 12, 1), (0, 13, 1), (0, 14, 1), (0, 15, 1), (0, 16, 1), (0, 17, 1), (0, 18, 1), (0, 19, 1), (0, 20, 1), (0, 21, 1), (0, 22, 1), (0, 23, 1), (0, 24, 1), (0, 24, 2), (0, 24, 3), (0, 24, 4), (0, 24, 5), (0, 24, 6), (0, 24, 7), (0, 24, 8), (0, 24, 9), (0, 24, 10), (0, 24, 11), (0, 24, 12), (0, 24, 13), (0, 24, 14), (0, 23, 15), (0, 23, 16)]
9
+    _assert_ant_move_history = [(0, 21, 20), (0, 20, 19), (0, 20, 19), (0, 20, 19), (0, 20, 19), (0, 20, 19), (0, 20, 19), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 19), (0, 21, 18), (0, 21, 17), (0, 21, 16), (0, 21, 16), (0, 21, 15), (0, 21, 14), (0, 22, 13), (0, 23, 13), (0, 24, 13), (0, 24, 13), (0, 24, 13), (0, 24, 13), (0, 24, 13), (0, 24, 13), (0, 23, 14), (0, 22, 15), (0, 21, 16), (0, 21, 16), (0, 21, 16), (0, 21, 16), (0, 21, 16), (0, 21, 15), (0, 21, 14), (0, 21, 13), (0, 21, 12), (0, 21, 11), (0, 21, 10), (0, 21, 9), (0, 21, 8), (0, 21, 7), (0, 21, 6), (0, 21, 5), (0, 21, 4), (0, 21, 3), (0, 21, 2), (0, 22, 1), (0, 22, 1), (0, 22, 1), (0, 22, 1), (0, 22, 1), (0, 22, 1), (0, 21, 1), (0, 20, 1), (0, 19, 1), (0, 18, 1), (0, 17, 1), (0, 16, 1), (0, 15, 1), (0, 14, 1), (0, 13, 1), (0, 12, 1), (0, 11, 1), (0, 10, 1), (0, 9, 1), (0, 8, 1), (0, 7, 2), (0, 6, 2), (0, 7, 3), (0, 8, 4), (0, 9, 5), (0, 10, 6), (0, 11, 7), (0, 12, 7), (0, 13, 7), (0, 14, 7), (0, 13, 7), (0, 12, 7), (0, 11, 7), (0, 11, 8), (0, 11, 9), (0, 11, 10), (0, 11, 9), (0, 11, 8), (0, 11, 7), (0, 12, 7), (0, 13, 7), (0, 14, 7), (0, 15, 7), (0, 16, 7), (0, 17, 7), (0, 18, 7), (0, 19, 7), (0, 20, 7), (0, 21, 7), (0, 21, 8), (0, 21, 9), (0, 21, 10), (0, 21, 11), (0, 21, 12), (0, 21, 13), (0, 21, 14), (0, 21, 15), (0, 21, 16), (0, 21, 17), (0, 21, 18), (0, 21, 19), (0, 20, 20), (0, 19, 21), (0, 19, 22), (0, 18, 23), (0, 17, 24), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 17, 25), (0, 18, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 19, 25), (0, 18, 25), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 17, 26), (0, 18, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 18, 25), (0, 17, 24), (0, 17, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 25), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 25), (0, 17, 24), (0, 18, 23), (0, 18, 23), (0, 19, 22), (0, 20, 21), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 20), (0, 21, 19), (0, 21, 18), (0, 21, 17), (0, 21, 16), (0, 21, 15), (0, 21, 14), (0, 21, 13), (0, 21, 12), (0, 21, 11), (0, 21, 10), (0, 21, 9), (0, 21, 8), (0, 20, 7), (0, 19, 7), (0, 18, 7), (0, 17, 7), (0, 16, 7), (0, 15, 7), (0, 14, 7), (0, 13, 7), (0, 12, 7), (0, 11, 7), (0, 10, 6), (0, 9, 5), (0, 8, 4), (0, 7, 3), (0, 6, 2), (0, 5, 1), (0, 6, 2), (0, 7, 3), (0, 8, 4), (0, 9, 5), (0, 10, 6), (0, 11, 7), (0, 12, 7), (0, 13, 7), (0, 14, 7), (0, 13, 7), (0, 12, 7), (0, 11, 7), (0, 11, 8), (0, 11, 9), (0, 11, 10), (0, 11, 9), (0, 11, 8), (0, 11, 7), (0, 12, 7), (0, 13, 7), (0, 14, 7), (0, 15, 7), (0, 16, 7), (0, 17, 7), (0, 18, 7), (0, 19, 7), (0, 20, 7), (0, 21, 7), (0, 21, 8), (0, 21, 9), (0, 21, 10), (0, 21, 11), (0, 21, 12), (0, 21, 13), (0, 21, 14), (0, 21, 15), (0, 21, 16), (0, 21, 17), (0, 21, 18), (0, 21, 19), (0, 21, 20), (0, 20, 21), (0, 19, 22), (0, 18, 23), (0, 17, 24), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 25), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 24), (0, 16, 25), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 16, 26), (0, 17, 26), (0, 18, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 26), (0, 19, 25), (0, 19, 24), (0, 19, 24), (0, 19, 24), (0, 19, 24), (0, 18, 23), (0, 18, 23), (0, 18, 23), (0, 18, 22), (0, 18, 21), (0, 18, 21), (0, 18, 21), (0, 18, 21), (0, 18, 21), (0, 18, 21), (0, 19, 22), (0, 19, 22), (0, 19, 22), (0, 19, 22), (0, 19, 22), (0, 19, 22), (0, 20, 21), (0, 21, 21), (0, 21, 21), (0, 21, 21), (0, 21, 21), (0, 21, 21), (0, 20, 22)]
10 10
 
11 11
     def setUp(self):
12 12
         super().setUp()