Advertisement
khaze1

py-tests

Nov 15th, 2024
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 136.64 KB | None | 0 0
  1. DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
  2. Install the buildx component to build images with BuildKit:
  3. https://docs.docker.com/go/buildx/
  4.  
  5. Sending build context to Docker daemon 2.83MB
  6.  
  7. Step 1/16 : FROM gcc:11.3 as build
  8. ---> 7580976b875b
  9. Step 2/16 : RUN apt update && apt install -y python3-pip cmake && pip3 install conan==1.*
  10. ---> Using cache
  11. ---> d70d944f060b
  12. Step 3/16 : COPY conanfile.txt /app/
  13. ---> Using cache
  14. ---> d9018e9b1dee
  15. Step 4/16 : RUN mkdir /app/build && cd /app/build && conan install .. --build=missing -s compiler.libcxx=libstdc++11 -s build_type=Release
  16. ---> Using cache
  17. ---> e824e5122ceb
  18. Step 5/16 : COPY ./src /app/src
  19. ---> Using cache
  20. ---> 1b3282e7917b
  21. Step 6/16 : COPY ./data /app/data
  22. ---> Using cache
  23. ---> b4553a326d65
  24. Step 7/16 : COPY ./static /app/static
  25. ---> Using cache
  26. ---> 23cf05f3ffc6
  27. Step 8/16 : COPY CMakeLists.txt /app/
  28. ---> Using cache
  29. ---> b23e40d7f88d
  30. Step 9/16 : RUN cd /app/build && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .
  31. ---> Using cache
  32. ---> f867a6637c6d
  33. Step 10/16 : FROM ubuntu:22.04 as run
  34. ---> 97271d29cb79
  35. Step 11/16 : RUN groupadd -r www && useradd -r -g www www
  36. ---> Using cache
  37. ---> 44a709dfb75d
  38. Step 12/16 : USER www
  39. ---> Using cache
  40. ---> 423a071f30fc
  41. Step 13/16 : COPY --from=build /app/build/bin/game_server /app/
  42. ---> Using cache
  43. ---> fe0065f8f4bb
  44. Step 14/16 : COPY ./data /app/data
  45. ---> Using cache
  46. ---> fbd1aca14146
  47. Step 15/16 : COPY ./static /app/static
  48. ---> Using cache
  49. ---> 3034d8c5d891
  50. Step 16/16 : ENTRYPOINT ["/app/game_server", "/app/data/config.json", "/app/static"]
  51. ---> Using cache
  52. ---> 8b07699796b7
  53. Successfully built 8b07699796b7
  54. Successfully tagged time_control:latest
  55. ./time_control/run.sh: line 15: /__w/cppbackend/cppbackend/cpp-backend-tests-practicum/scripts/sprint2/time_control/../../../..//.venv/bin/activate: No such file or directory
  56. ============================= test session starts ==============================
  57. platform linux -- Python 3.10.6, pytest-7.1.2, pluggy-1.0.0
  58. rootdir: /__w/cppbackend/cppbackend/cpp-backend-tests-practicum
  59. plugins: quickcheck-0.9.0, parallel-0.1.1, xprocess-0.20.0
  60. collected 105 items
  61. pytest-parallel: 2 workers (processes), 1 test per worker (thread)
  62. ........................................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  63. =================================== FAILURES ===================================
  64. _______________________________ test_match_roads _______________________________
  65.  
  66. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a9ae0>
  67. game_server = <game_server.GameServer object at 0x7f1cee7aa560>
  68.  
  69. def test_match_roads(docker_server, game_server):
  70. py_maps = game_server.get_maps()
  71. > server_maps = docker_server.get_maps()
  72.  
  73. ../../tests/test_s02_time_control.py:123:
  74. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  75. ../../tests/cpp_server_api.py:236: in get_maps
  76. self.validate_response(res)
  77. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  78.  
  79. res = <Response [200]>
  80.  
  81. @staticmethod
  82. def validate_response(res: requests.Response):
  83. if res.status_code != 200:
  84. raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  85.  
  86. CppServer.assert_fields('Response headers',
  87. ['content-type', 'cache-control', 'content-length'],
  88. res.headers.keys())
  89.  
  90. if res.headers['content-type'] != 'application/json':
  91. raise UnexpectedData('Content-type', 'application/json', res.headers['content-type'])
  92.  
  93. if res.headers['cache-control'] != 'no-cache':
  94. > raise UnexpectedData('Cache-control', 'no-cache', res.headers['cache-control'])
  95. E cpp_server_api.UnexpectedData: <unprintable UnexpectedData object>
  96.  
  97. ../../tests/cpp_server_api.py:353: UnexpectedData
  98. _________________________ test_turn_one_player[map1-L] _________________________
  99.  
  100. docker_server = <cpp_server_api.CppServer object at 0x7f1cee637970>
  101. game_server = <game_server.GameServer object at 0x7f1cee636a70>, direction = 'L'
  102. map_id = 'map1'
  103.  
  104. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  105. def test_turn_one_player(docker_server, game_server, direction, map_id):
  106. token, _ = add_player(docker_server, game_server, map_id, 'player')
  107. > move_players(docker_server, game_server, token, direction)
  108.  
  109. ../../tests/test_s02_time_control.py:137:
  110. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  111. ../../tests/test_s02_time_control.py:32: in move_players
  112. server.move(token, direction)
  113. ../../tests/cpp_server_api.py:312: in move
  114. self.validate_response(res)
  115. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  116.  
  117. res = <Response [400]>
  118.  
  119. @staticmethod
  120. def validate_response(res: requests.Response):
  121. if res.status_code != 200:
  122. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  123. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  124.  
  125. ../../tests/cpp_server_api.py:343: BadRequest
  126. _________________________ test_turn_one_player[map1-R] _________________________
  127.  
  128. docker_server = <cpp_server_api.CppServer object at 0x7f1cef9d2a40>
  129. game_server = <game_server.GameServer object at 0x7f1cee7aa920>, direction = 'R'
  130. map_id = 'map1'
  131.  
  132. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  133. def test_turn_one_player(docker_server, game_server, direction, map_id):
  134. token, _ = add_player(docker_server, game_server, map_id, 'player')
  135. > move_players(docker_server, game_server, token, direction)
  136.  
  137. ../../tests/test_s02_time_control.py:137:
  138. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  139. ../../tests/test_s02_time_control.py:32: in move_players
  140. server.move(token, direction)
  141. ../../tests/cpp_server_api.py:312: in move
  142. self.validate_response(res)
  143. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  144.  
  145. res = <Response [400]>
  146.  
  147. @staticmethod
  148. def validate_response(res: requests.Response):
  149. if res.status_code != 200:
  150. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  151. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  152.  
  153. ../../tests/cpp_server_api.py:343: BadRequest
  154. _________________________ test_turn_one_player[map1-U] _________________________
  155.  
  156. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b5240>
  157. game_server = <game_server.GameServer object at 0x7f1cee6b4970>, direction = 'U'
  158. map_id = 'map1'
  159.  
  160. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  161. def test_turn_one_player(docker_server, game_server, direction, map_id):
  162. token, _ = add_player(docker_server, game_server, map_id, 'player')
  163. > move_players(docker_server, game_server, token, direction)
  164.  
  165. ../../tests/test_s02_time_control.py:137:
  166. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  167. ../../tests/test_s02_time_control.py:32: in move_players
  168. server.move(token, direction)
  169. ../../tests/cpp_server_api.py:312: in move
  170. self.validate_response(res)
  171. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  172.  
  173. res = <Response [400]>
  174.  
  175. @staticmethod
  176. def validate_response(res: requests.Response):
  177. if res.status_code != 200:
  178. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  179. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  180.  
  181. ../../tests/cpp_server_api.py:343: BadRequest
  182. _________________________ test_turn_one_player[map1-D] _________________________
  183.  
  184. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a2440>
  185. game_server = <game_server.GameServer object at 0x7f1cee7a2ce0>, direction = 'D'
  186. map_id = 'map1'
  187.  
  188. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  189. def test_turn_one_player(docker_server, game_server, direction, map_id):
  190. token, _ = add_player(docker_server, game_server, map_id, 'player')
  191. > move_players(docker_server, game_server, token, direction)
  192.  
  193. ../../tests/test_s02_time_control.py:137:
  194. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  195. ../../tests/test_s02_time_control.py:32: in move_players
  196. server.move(token, direction)
  197. ../../tests/cpp_server_api.py:312: in move
  198. self.validate_response(res)
  199. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  200.  
  201. res = <Response [400]>
  202.  
  203. @staticmethod
  204. def validate_response(res: requests.Response):
  205. if res.status_code != 200:
  206. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  207. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  208.  
  209. ../../tests/cpp_server_api.py:343: BadRequest
  210. _________________________ test_turn_one_player[town-R] _________________________
  211.  
  212. docker_server = <cpp_server_api.CppServer object at 0x7f1cee783250>
  213. game_server = <game_server.GameServer object at 0x7f1cee7835b0>, direction = 'R'
  214. map_id = 'town'
  215.  
  216. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  217. def test_turn_one_player(docker_server, game_server, direction, map_id):
  218. token, _ = add_player(docker_server, game_server, map_id, 'player')
  219. > move_players(docker_server, game_server, token, direction)
  220.  
  221. ../../tests/test_s02_time_control.py:137:
  222. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  223. ../../tests/test_s02_time_control.py:32: in move_players
  224. server.move(token, direction)
  225. ../../tests/cpp_server_api.py:312: in move
  226. self.validate_response(res)
  227. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  228.  
  229. res = <Response [400]>
  230.  
  231. @staticmethod
  232. def validate_response(res: requests.Response):
  233. if res.status_code != 200:
  234. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  235. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  236.  
  237. ../../tests/cpp_server_api.py:343: BadRequest
  238. _________________________ test_turn_one_player[town-L] _________________________
  239.  
  240. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7abe80>
  241. game_server = <game_server.GameServer object at 0x7f1cee7a1990>, direction = 'L'
  242. map_id = 'town'
  243.  
  244. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  245. def test_turn_one_player(docker_server, game_server, direction, map_id):
  246. token, _ = add_player(docker_server, game_server, map_id, 'player')
  247. > move_players(docker_server, game_server, token, direction)
  248.  
  249. ../../tests/test_s02_time_control.py:137:
  250. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  251. ../../tests/test_s02_time_control.py:32: in move_players
  252. server.move(token, direction)
  253. ../../tests/cpp_server_api.py:312: in move
  254. self.validate_response(res)
  255. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  256.  
  257. res = <Response [400]>
  258.  
  259. @staticmethod
  260. def validate_response(res: requests.Response):
  261. if res.status_code != 200:
  262. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  263. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  264.  
  265. ../../tests/cpp_server_api.py:343: BadRequest
  266. _________________________ test_turn_one_player[town-U] _________________________
  267.  
  268. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b58a0>
  269. game_server = <game_server.GameServer object at 0x7f1cee6b5b40>, direction = 'U'
  270. map_id = 'town'
  271.  
  272. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  273. def test_turn_one_player(docker_server, game_server, direction, map_id):
  274. token, _ = add_player(docker_server, game_server, map_id, 'player')
  275. > move_players(docker_server, game_server, token, direction)
  276.  
  277. ../../tests/test_s02_time_control.py:137:
  278. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  279. ../../tests/test_s02_time_control.py:32: in move_players
  280. server.move(token, direction)
  281. ../../tests/cpp_server_api.py:312: in move
  282. self.validate_response(res)
  283. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  284.  
  285. res = <Response [400]>
  286.  
  287. @staticmethod
  288. def validate_response(res: requests.Response):
  289. if res.status_code != 200:
  290. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  291. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  292.  
  293. ../../tests/cpp_server_api.py:343: BadRequest
  294. _________________________ test_turn_one_player[town-D] _________________________
  295.  
  296. docker_server = <cpp_server_api.CppServer object at 0x7f1cee634790>
  297. game_server = <game_server.GameServer object at 0x7f1cee6356f0>, direction = 'D'
  298. map_id = 'town'
  299.  
  300. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  301. def test_turn_one_player(docker_server, game_server, direction, map_id):
  302. token, _ = add_player(docker_server, game_server, map_id, 'player')
  303. > move_players(docker_server, game_server, token, direction)
  304.  
  305. ../../tests/test_s02_time_control.py:137:
  306. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  307. ../../tests/test_s02_time_control.py:32: in move_players
  308. server.move(token, direction)
  309. ../../tests/cpp_server_api.py:312: in move
  310. self.validate_response(res)
  311. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  312.  
  313. res = <Response [400]>
  314.  
  315. @staticmethod
  316. def validate_response(res: requests.Response):
  317. if res.status_code != 200:
  318. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  319. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  320.  
  321. ../../tests/cpp_server_api.py:343: BadRequest
  322. ________________________ test_small_move_one_player[R] _________________________
  323.  
  324. docker_server = <cpp_server_api.CppServer object at 0x7f1cee636020>
  325. game_server = <game_server.GameServer object at 0x7f1cee634e50>, direction = 'R'
  326. ticks = 140, map_id = 'town'
  327.  
  328. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  329. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  330. def test_small_move_one_player(docker_server, game_server, direction, ticks=140, map_id='town'):
  331. token, _ = add_player(docker_server, game_server, map_id, 'player')
  332. > move_players(docker_server, game_server, token, direction)
  333.  
  334. ../../tests/test_s02_time_control.py:147:
  335. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  336. ../../tests/test_s02_time_control.py:32: in move_players
  337. server.move(token, direction)
  338. ../../tests/cpp_server_api.py:312: in move
  339. self.validate_response(res)
  340. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  341.  
  342. res = <Response [400]>
  343.  
  344. @staticmethod
  345. def validate_response(res: requests.Response):
  346. if res.status_code != 200:
  347. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  348. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  349.  
  350. ../../tests/cpp_server_api.py:343: BadRequest
  351. ________________________ test_small_move_one_player[U] _________________________
  352.  
  353. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6912d0>
  354. game_server = <game_server.GameServer object at 0x7f1cee6924a0>, direction = 'U'
  355. ticks = 140, map_id = 'town'
  356.  
  357. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  358. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  359. def test_small_move_one_player(docker_server, game_server, direction, ticks=140, map_id='town'):
  360. token, _ = add_player(docker_server, game_server, map_id, 'player')
  361. > move_players(docker_server, game_server, token, direction)
  362.  
  363. ../../tests/test_s02_time_control.py:147:
  364. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  365. ../../tests/test_s02_time_control.py:32: in move_players
  366. server.move(token, direction)
  367. ../../tests/cpp_server_api.py:312: in move
  368. self.validate_response(res)
  369. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  370.  
  371. res = <Response [400]>
  372.  
  373. @staticmethod
  374. def validate_response(res: requests.Response):
  375. if res.status_code != 200:
  376. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  377. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  378.  
  379. ../../tests/cpp_server_api.py:343: BadRequest
  380. ________________________ test_small_move_one_player[D] _________________________
  381.  
  382. docker_server = <cpp_server_api.CppServer object at 0x7f1cee782a70>
  383. game_server = <game_server.GameServer object at 0x7f1cee782830>, direction = 'D'
  384. ticks = 140, map_id = 'town'
  385.  
  386. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  387. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  388. def test_small_move_one_player(docker_server, game_server, direction, ticks=140, map_id='town'):
  389. token, _ = add_player(docker_server, game_server, map_id, 'player')
  390. > move_players(docker_server, game_server, token, direction)
  391.  
  392. ../../tests/test_s02_time_control.py:147:
  393. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  394. ../../tests/test_s02_time_control.py:32: in move_players
  395. server.move(token, direction)
  396. ../../tests/cpp_server_api.py:312: in move
  397. self.validate_response(res)
  398. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  399.  
  400. res = <Response [400]>
  401.  
  402. @staticmethod
  403. def validate_response(res: requests.Response):
  404. if res.status_code != 200:
  405. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  406. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  407.  
  408. ../../tests/cpp_server_api.py:343: BadRequest
  409. ____________________ test_big_move_one_player[map1-48289-R] ____________________
  410.  
  411. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a32e0>
  412. game_server = <game_server.GameServer object at 0x7f1cee7a1ae0>, direction = 'R'
  413. ticks = 48289, map_id = 'map1'
  414.  
  415. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  416. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  417. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  418. token, _ = add_player(docker_server, game_server, map_id, 'player')
  419. > move_players(docker_server, game_server, token, direction)
  420.  
  421. ../../tests/test_s02_time_control.py:162:
  422. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  423. ../../tests/test_s02_time_control.py:32: in move_players
  424. server.move(token, direction)
  425. ../../tests/cpp_server_api.py:312: in move
  426. self.validate_response(res)
  427. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  428.  
  429. res = <Response [400]>
  430.  
  431. @staticmethod
  432. def validate_response(res: requests.Response):
  433. if res.status_code != 200:
  434. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  435. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  436.  
  437. ../../tests/cpp_server_api.py:343: BadRequest
  438. ________________________ test_small_move_one_player[L] _________________________
  439.  
  440. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b3100>
  441. game_server = <game_server.GameServer object at 0x7f1cee6b31c0>, direction = 'L'
  442. ticks = 140, map_id = 'town'
  443.  
  444. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  445. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  446. def test_small_move_one_player(docker_server, game_server, direction, ticks=140, map_id='town'):
  447. token, _ = add_player(docker_server, game_server, map_id, 'player')
  448. > move_players(docker_server, game_server, token, direction)
  449.  
  450. ../../tests/test_s02_time_control.py:147:
  451. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  452. ../../tests/test_s02_time_control.py:32: in move_players
  453. server.move(token, direction)
  454. ../../tests/cpp_server_api.py:312: in move
  455. self.validate_response(res)
  456. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  457.  
  458. res = <Response [400]>
  459.  
  460. @staticmethod
  461. def validate_response(res: requests.Response):
  462. if res.status_code != 200:
  463. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  464. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  465.  
  466. ../../tests/cpp_server_api.py:343: BadRequest
  467. ____________________ test_big_move_one_player[map1-48289-L] ____________________
  468.  
  469. docker_server = <cpp_server_api.CppServer object at 0x7f1ced55bfa0>
  470. game_server = <game_server.GameServer object at 0x7f1ced559510>, direction = 'L'
  471. ticks = 48289, map_id = 'map1'
  472.  
  473. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  474. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  475. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  476. token, _ = add_player(docker_server, game_server, map_id, 'player')
  477. > move_players(docker_server, game_server, token, direction)
  478.  
  479. ../../tests/test_s02_time_control.py:162:
  480. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  481. ../../tests/test_s02_time_control.py:32: in move_players
  482. server.move(token, direction)
  483. ../../tests/cpp_server_api.py:312: in move
  484. self.validate_response(res)
  485. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  486.  
  487. res = <Response [400]>
  488.  
  489. @staticmethod
  490. def validate_response(res: requests.Response):
  491. if res.status_code != 200:
  492. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  493. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  494.  
  495. ../../tests/cpp_server_api.py:343: BadRequest
  496. ____________________ test_big_move_one_player[map1-48289-U] ____________________
  497.  
  498. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7804f0>
  499. game_server = <game_server.GameServer object at 0x7f1cee780df0>, direction = 'U'
  500. ticks = 48289, map_id = 'map1'
  501.  
  502. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  503. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  504. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  505. token, _ = add_player(docker_server, game_server, map_id, 'player')
  506. > move_players(docker_server, game_server, token, direction)
  507.  
  508. ../../tests/test_s02_time_control.py:162:
  509. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  510. ../../tests/test_s02_time_control.py:32: in move_players
  511. server.move(token, direction)
  512. ../../tests/cpp_server_api.py:312: in move
  513. self.validate_response(res)
  514. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  515.  
  516. res = <Response [400]>
  517.  
  518. @staticmethod
  519. def validate_response(res: requests.Response):
  520. if res.status_code != 200:
  521. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  522. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  523.  
  524. ../../tests/cpp_server_api.py:343: BadRequest
  525. ____________________ test_big_move_one_player[map1-59164-R] ____________________
  526.  
  527. docker_server = <cpp_server_api.CppServer object at 0x7f1cee783700>
  528. game_server = <game_server.GameServer object at 0x7f1cee7824d0>, direction = 'R'
  529. ticks = 59164, map_id = 'map1'
  530.  
  531. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  532. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  533. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  534. token, _ = add_player(docker_server, game_server, map_id, 'player')
  535. > move_players(docker_server, game_server, token, direction)
  536.  
  537. ../../tests/test_s02_time_control.py:162:
  538. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  539. ../../tests/test_s02_time_control.py:32: in move_players
  540. server.move(token, direction)
  541. ../../tests/cpp_server_api.py:312: in move
  542. self.validate_response(res)
  543. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  544.  
  545. res = <Response [400]>
  546.  
  547. @staticmethod
  548. def validate_response(res: requests.Response):
  549. if res.status_code != 200:
  550. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  551. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  552.  
  553. ../../tests/cpp_server_api.py:343: BadRequest
  554. ____________________ test_big_move_one_player[map1-59164-L] ____________________
  555.  
  556. docker_server = <cpp_server_api.CppServer object at 0x7f1ced511c00>
  557. game_server = <game_server.GameServer object at 0x7f1ced5127d0>, direction = 'L'
  558. ticks = 59164, map_id = 'map1'
  559.  
  560. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  561. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  562. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  563. token, _ = add_player(docker_server, game_server, map_id, 'player')
  564. > move_players(docker_server, game_server, token, direction)
  565.  
  566. ../../tests/test_s02_time_control.py:162:
  567. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  568. ../../tests/test_s02_time_control.py:32: in move_players
  569. server.move(token, direction)
  570. ../../tests/cpp_server_api.py:312: in move
  571. self.validate_response(res)
  572. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  573.  
  574. res = <Response [400]>
  575.  
  576. @staticmethod
  577. def validate_response(res: requests.Response):
  578. if res.status_code != 200:
  579. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  580. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  581.  
  582. ../../tests/cpp_server_api.py:343: BadRequest
  583. ____________________ test_big_move_one_player[map1-59164-U] ____________________
  584.  
  585. docker_server = <cpp_server_api.CppServer object at 0x7f1ced511090>
  586. game_server = <game_server.GameServer object at 0x7f1cee6a85b0>, direction = 'U'
  587. ticks = 59164, map_id = 'map1'
  588.  
  589. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  590. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  591. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  592. token, _ = add_player(docker_server, game_server, map_id, 'player')
  593. > move_players(docker_server, game_server, token, direction)
  594.  
  595. ../../tests/test_s02_time_control.py:162:
  596. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  597. ../../tests/test_s02_time_control.py:32: in move_players
  598. server.move(token, direction)
  599. ../../tests/cpp_server_api.py:312: in move
  600. self.validate_response(res)
  601. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  602.  
  603. res = <Response [400]>
  604.  
  605. @staticmethod
  606. def validate_response(res: requests.Response):
  607. if res.status_code != 200:
  608. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  609. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  610.  
  611. ../../tests/cpp_server_api.py:343: BadRequest
  612. ____________________ test_big_move_one_player[map1-59164-D] ____________________
  613.  
  614. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6a8b80>
  615. game_server = <game_server.GameServer object at 0x7f1cee6a9840>, direction = 'D'
  616. ticks = 59164, map_id = 'map1'
  617.  
  618. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  619. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  620. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  621. token, _ = add_player(docker_server, game_server, map_id, 'player')
  622. > move_players(docker_server, game_server, token, direction)
  623.  
  624. ../../tests/test_s02_time_control.py:162:
  625. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  626. ../../tests/test_s02_time_control.py:32: in move_players
  627. server.move(token, direction)
  628. ../../tests/cpp_server_api.py:312: in move
  629. self.validate_response(res)
  630. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  631.  
  632. res = <Response [400]>
  633.  
  634. @staticmethod
  635. def validate_response(res: requests.Response):
  636. if res.status_code != 200:
  637. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  638. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  639.  
  640. ../../tests/cpp_server_api.py:343: BadRequest
  641. ____________________ test_big_move_one_player[map1-48289-D] ____________________
  642.  
  643. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5c22c0>
  644. game_server = <game_server.GameServer object at 0x7f1ced5c2140>, direction = 'D'
  645. ticks = 48289, map_id = 'map1'
  646.  
  647. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  648. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  649. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  650. token, _ = add_player(docker_server, game_server, map_id, 'player')
  651. > move_players(docker_server, game_server, token, direction)
  652.  
  653. ../../tests/test_s02_time_control.py:162:
  654. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  655. ../../tests/test_s02_time_control.py:32: in move_players
  656. server.move(token, direction)
  657. ../../tests/cpp_server_api.py:312: in move
  658. self.validate_response(res)
  659. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  660.  
  661. res = <Response [400]>
  662.  
  663. @staticmethod
  664. def validate_response(res: requests.Response):
  665. if res.status_code != 200:
  666. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  667. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  668.  
  669. ../../tests/cpp_server_api.py:343: BadRequest
  670. ____________________ test_big_move_one_player[map1-60591-L] ____________________
  671.  
  672. docker_server = <cpp_server_api.CppServer object at 0x7f1ced55bfa0>
  673. game_server = <game_server.GameServer object at 0x7f1ced55a290>, direction = 'L'
  674. ticks = 60591, map_id = 'map1'
  675.  
  676. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  677. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  678. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  679. token, _ = add_player(docker_server, game_server, map_id, 'player')
  680. > move_players(docker_server, game_server, token, direction)
  681.  
  682. ../../tests/test_s02_time_control.py:162:
  683. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  684. ../../tests/test_s02_time_control.py:32: in move_players
  685. server.move(token, direction)
  686. ../../tests/cpp_server_api.py:312: in move
  687. self.validate_response(res)
  688. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  689.  
  690. res = <Response [400]>
  691.  
  692. @staticmethod
  693. def validate_response(res: requests.Response):
  694. if res.status_code != 200:
  695. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  696. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  697.  
  698. ../../tests/cpp_server_api.py:343: BadRequest
  699. ____________________ test_big_move_one_player[map1-60591-U] ____________________
  700.  
  701. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a20b0>
  702. game_server = <game_server.GameServer object at 0x7f1cee7a0d90>, direction = 'U'
  703. ticks = 60591, map_id = 'map1'
  704.  
  705. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  706. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  707. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  708. token, _ = add_player(docker_server, game_server, map_id, 'player')
  709. > move_players(docker_server, game_server, token, direction)
  710.  
  711. ../../tests/test_s02_time_control.py:162:
  712. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  713. ../../tests/test_s02_time_control.py:32: in move_players
  714. server.move(token, direction)
  715. ../../tests/cpp_server_api.py:312: in move
  716. self.validate_response(res)
  717. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  718.  
  719. res = <Response [400]>
  720.  
  721. @staticmethod
  722. def validate_response(res: requests.Response):
  723. if res.status_code != 200:
  724. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  725. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  726.  
  727. ../../tests/cpp_server_api.py:343: BadRequest
  728. ____________________ test_big_move_one_player[map1-60591-D] ____________________
  729.  
  730. docker_server = <cpp_server_api.CppServer object at 0x7f1cee73d480>
  731. game_server = <game_server.GameServer object at 0x7f1cee73f9a0>, direction = 'D'
  732. ticks = 60591, map_id = 'map1'
  733.  
  734. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  735. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  736. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  737. token, _ = add_player(docker_server, game_server, map_id, 'player')
  738. > move_players(docker_server, game_server, token, direction)
  739.  
  740. ../../tests/test_s02_time_control.py:162:
  741. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  742. ../../tests/test_s02_time_control.py:32: in move_players
  743. server.move(token, direction)
  744. ../../tests/cpp_server_api.py:312: in move
  745. self.validate_response(res)
  746. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  747.  
  748. res = <Response [400]>
  749.  
  750. @staticmethod
  751. def validate_response(res: requests.Response):
  752. if res.status_code != 200:
  753. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  754. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  755.  
  756. ../../tests/cpp_server_api.py:343: BadRequest
  757. ____________________ test_big_move_one_player[town-48289-R] ____________________
  758.  
  759. docker_server = <cpp_server_api.CppServer object at 0x7f1cee73e1d0>
  760. game_server = <game_server.GameServer object at 0x7f1cee77f640>, direction = 'R'
  761. ticks = 48289, map_id = 'town'
  762.  
  763. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  764. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  765. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  766. token, _ = add_player(docker_server, game_server, map_id, 'player')
  767. > move_players(docker_server, game_server, token, direction)
  768.  
  769. ../../tests/test_s02_time_control.py:162:
  770. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  771. ../../tests/test_s02_time_control.py:32: in move_players
  772. server.move(token, direction)
  773. ../../tests/cpp_server_api.py:312: in move
  774. self.validate_response(res)
  775. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  776.  
  777. res = <Response [400]>
  778.  
  779. @staticmethod
  780. def validate_response(res: requests.Response):
  781. if res.status_code != 200:
  782. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  783. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  784.  
  785. ../../tests/cpp_server_api.py:343: BadRequest
  786. ____________________ test_big_move_one_player[map1-60591-R] ____________________
  787.  
  788. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4f0ac0>
  789. game_server = <game_server.GameServer object at 0x7f1ced4f0f70>, direction = 'R'
  790. ticks = 60591, map_id = 'map1'
  791.  
  792. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  793. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  794. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  795. token, _ = add_player(docker_server, game_server, map_id, 'player')
  796. > move_players(docker_server, game_server, token, direction)
  797.  
  798. ../../tests/test_s02_time_control.py:162:
  799. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  800. ../../tests/test_s02_time_control.py:32: in move_players
  801. server.move(token, direction)
  802. ../../tests/cpp_server_api.py:312: in move
  803. self.validate_response(res)
  804. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  805.  
  806. res = <Response [400]>
  807.  
  808. @staticmethod
  809. def validate_response(res: requests.Response):
  810. if res.status_code != 200:
  811. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  812. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  813.  
  814. ../../tests/cpp_server_api.py:343: BadRequest
  815. ____________________ test_big_move_one_player[town-48289-L] ____________________
  816.  
  817. docker_server = <cpp_server_api.CppServer object at 0x7f1ced55b0d0>
  818. game_server = <game_server.GameServer object at 0x7f1ced55b3a0>, direction = 'L'
  819. ticks = 48289, map_id = 'town'
  820.  
  821. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  822. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  823. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  824. token, _ = add_player(docker_server, game_server, map_id, 'player')
  825. > move_players(docker_server, game_server, token, direction)
  826.  
  827. ../../tests/test_s02_time_control.py:162:
  828. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  829. ../../tests/test_s02_time_control.py:32: in move_players
  830. server.move(token, direction)
  831. ../../tests/cpp_server_api.py:312: in move
  832. self.validate_response(res)
  833. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  834.  
  835. res = <Response [400]>
  836.  
  837. @staticmethod
  838. def validate_response(res: requests.Response):
  839. if res.status_code != 200:
  840. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  841. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  842.  
  843. ../../tests/cpp_server_api.py:343: BadRequest
  844. ____________________ test_big_move_one_player[town-48289-U] ____________________
  845.  
  846. docker_server = <cpp_server_api.CppServer object at 0x7f1ced512c20>
  847. game_server = <game_server.GameServer object at 0x7f1ced510b20>, direction = 'U'
  848. ticks = 48289, map_id = 'town'
  849.  
  850. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  851. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  852. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  853. token, _ = add_player(docker_server, game_server, map_id, 'player')
  854. > move_players(docker_server, game_server, token, direction)
  855.  
  856. ../../tests/test_s02_time_control.py:162:
  857. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  858. ../../tests/test_s02_time_control.py:32: in move_players
  859. server.move(token, direction)
  860. ../../tests/cpp_server_api.py:312: in move
  861. self.validate_response(res)
  862. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  863.  
  864. res = <Response [400]>
  865.  
  866. @staticmethod
  867. def validate_response(res: requests.Response):
  868. if res.status_code != 200:
  869. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  870. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  871.  
  872. ../../tests/cpp_server_api.py:343: BadRequest
  873. ____________________ test_big_move_one_player[town-48289-D] ____________________
  874.  
  875. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a23e0>
  876. game_server = <game_server.GameServer object at 0x7f1cee7a0220>, direction = 'D'
  877. ticks = 48289, map_id = 'town'
  878.  
  879. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  880. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  881. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  882. token, _ = add_player(docker_server, game_server, map_id, 'player')
  883. > move_players(docker_server, game_server, token, direction)
  884.  
  885. ../../tests/test_s02_time_control.py:162:
  886. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  887. ../../tests/test_s02_time_control.py:32: in move_players
  888. server.move(token, direction)
  889. ../../tests/cpp_server_api.py:312: in move
  890. self.validate_response(res)
  891. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  892.  
  893. res = <Response [400]>
  894.  
  895. @staticmethod
  896. def validate_response(res: requests.Response):
  897. if res.status_code != 200:
  898. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  899. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  900.  
  901. ../../tests/cpp_server_api.py:343: BadRequest
  902. ____________________ test_big_move_one_player[town-59164-R] ____________________
  903.  
  904. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7808e0>
  905. game_server = <game_server.GameServer object at 0x7f1cee780130>, direction = 'R'
  906. ticks = 59164, map_id = 'town'
  907.  
  908. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  909. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  910. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  911. token, _ = add_player(docker_server, game_server, map_id, 'player')
  912. > move_players(docker_server, game_server, token, direction)
  913.  
  914. ../../tests/test_s02_time_control.py:162:
  915. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  916. ../../tests/test_s02_time_control.py:32: in move_players
  917. server.move(token, direction)
  918. ../../tests/cpp_server_api.py:312: in move
  919. self.validate_response(res)
  920. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  921.  
  922. res = <Response [400]>
  923.  
  924. @staticmethod
  925. def validate_response(res: requests.Response):
  926. if res.status_code != 200:
  927. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  928. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  929.  
  930. ../../tests/cpp_server_api.py:343: BadRequest
  931. ____________________ test_big_move_one_player[town-59164-L] ____________________
  932.  
  933. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6353c0>
  934. game_server = <game_server.GameServer object at 0x7f1cee6361d0>, direction = 'L'
  935. ticks = 59164, map_id = 'town'
  936.  
  937. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  938. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  939. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  940. token, _ = add_player(docker_server, game_server, map_id, 'player')
  941. > move_players(docker_server, game_server, token, direction)
  942.  
  943. ../../tests/test_s02_time_control.py:162:
  944. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  945. ../../tests/test_s02_time_control.py:32: in move_players
  946. server.move(token, direction)
  947. ../../tests/cpp_server_api.py:312: in move
  948. self.validate_response(res)
  949. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  950.  
  951. res = <Response [400]>
  952.  
  953. @staticmethod
  954. def validate_response(res: requests.Response):
  955. if res.status_code != 200:
  956. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  957. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  958.  
  959. ../../tests/cpp_server_api.py:343: BadRequest
  960. ____________________ test_big_move_one_player[town-59164-U] ____________________
  961.  
  962. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4f2830>
  963. game_server = <game_server.GameServer object at 0x7f1ced4f3a30>, direction = 'U'
  964. ticks = 59164, map_id = 'town'
  965.  
  966. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  967. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  968. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  969. token, _ = add_player(docker_server, game_server, map_id, 'player')
  970. > move_players(docker_server, game_server, token, direction)
  971.  
  972. ../../tests/test_s02_time_control.py:162:
  973. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  974. ../../tests/test_s02_time_control.py:32: in move_players
  975. server.move(token, direction)
  976. ../../tests/cpp_server_api.py:312: in move
  977. self.validate_response(res)
  978. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  979.  
  980. res = <Response [400]>
  981.  
  982. @staticmethod
  983. def validate_response(res: requests.Response):
  984. if res.status_code != 200:
  985. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  986. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  987.  
  988. ../../tests/cpp_server_api.py:343: BadRequest
  989. ____________________ test_big_move_one_player[town-59164-D] ____________________
  990.  
  991. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4fd870>
  992. game_server = <game_server.GameServer object at 0x7f1ced4ff970>, direction = 'D'
  993. ticks = 59164, map_id = 'town'
  994.  
  995. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  996. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  997. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  998. token, _ = add_player(docker_server, game_server, map_id, 'player')
  999. > move_players(docker_server, game_server, token, direction)
  1000.  
  1001. ../../tests/test_s02_time_control.py:162:
  1002. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1003. ../../tests/test_s02_time_control.py:32: in move_players
  1004. server.move(token, direction)
  1005. ../../tests/cpp_server_api.py:312: in move
  1006. self.validate_response(res)
  1007. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1008.  
  1009. res = <Response [400]>
  1010.  
  1011. @staticmethod
  1012. def validate_response(res: requests.Response):
  1013. if res.status_code != 200:
  1014. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1015. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1016.  
  1017. ../../tests/cpp_server_api.py:343: BadRequest
  1018. ____________________ test_big_move_one_player[town-60591-R] ____________________
  1019.  
  1020. docker_server = <cpp_server_api.CppServer object at 0x7f1ced513c40>
  1021. game_server = <game_server.GameServer object at 0x7f1ced510670>, direction = 'R'
  1022. ticks = 60591, map_id = 'town'
  1023.  
  1024. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  1025. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  1026. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  1027. token, _ = add_player(docker_server, game_server, map_id, 'player')
  1028. > move_players(docker_server, game_server, token, direction)
  1029.  
  1030. ../../tests/test_s02_time_control.py:162:
  1031. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1032. ../../tests/test_s02_time_control.py:32: in move_players
  1033. server.move(token, direction)
  1034. ../../tests/cpp_server_api.py:312: in move
  1035. self.validate_response(res)
  1036. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1037.  
  1038. res = <Response [400]>
  1039.  
  1040. @staticmethod
  1041. def validate_response(res: requests.Response):
  1042. if res.status_code != 200:
  1043. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1044. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1045.  
  1046. ../../tests/cpp_server_api.py:343: BadRequest
  1047. ____________________ test_big_move_one_player[town-60591-L] ____________________
  1048.  
  1049. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6378e0>
  1050. game_server = <game_server.GameServer object at 0x7f1cee634190>, direction = 'L'
  1051. ticks = 60591, map_id = 'town'
  1052.  
  1053. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  1054. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  1055. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  1056. token, _ = add_player(docker_server, game_server, map_id, 'player')
  1057. > move_players(docker_server, game_server, token, direction)
  1058.  
  1059. ../../tests/test_s02_time_control.py:162:
  1060. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1061. ../../tests/test_s02_time_control.py:32: in move_players
  1062. server.move(token, direction)
  1063. ../../tests/cpp_server_api.py:312: in move
  1064. self.validate_response(res)
  1065. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1066.  
  1067. res = <Response [400]>
  1068.  
  1069. @staticmethod
  1070. def validate_response(res: requests.Response):
  1071. if res.status_code != 200:
  1072. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1073. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1074.  
  1075. ../../tests/cpp_server_api.py:343: BadRequest
  1076. ____________________ test_big_move_one_player[town-60591-U] ____________________
  1077.  
  1078. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5609a0>
  1079. game_server = <game_server.GameServer object at 0x7f1ced5621d0>, direction = 'U'
  1080. ticks = 60591, map_id = 'town'
  1081.  
  1082. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  1083. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  1084. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  1085. token, _ = add_player(docker_server, game_server, map_id, 'player')
  1086. > move_players(docker_server, game_server, token, direction)
  1087.  
  1088. ../../tests/test_s02_time_control.py:162:
  1089. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1090. ../../tests/test_s02_time_control.py:32: in move_players
  1091. server.move(token, direction)
  1092. ../../tests/cpp_server_api.py:312: in move
  1093. self.validate_response(res)
  1094. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1095.  
  1096. res = <Response [400]>
  1097.  
  1098. @staticmethod
  1099. def validate_response(res: requests.Response):
  1100. if res.status_code != 200:
  1101. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1102. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1103.  
  1104. ../../tests/cpp_server_api.py:343: BadRequest
  1105. _____________________ test_move_sequence_one_player[map1] ______________________
  1106.  
  1107. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a2680>
  1108. game_server = <game_server.GameServer object at 0x7f1cee7a1c60>, map_id = 'map1'
  1109.  
  1110. def test_move_sequence_one_player(docker_server, game_server, map_id):
  1111. token, _ = add_player(docker_server, game_server, map_id, 'player')
  1112.  
  1113. random.seed(345612) # Заглушка, чтобы не ловить баги. Существует, пока не искоренили баги из решения
  1114. for i in range(0, 10):
  1115. direction = Direction.random_str()
  1116.  
  1117. > move_players(docker_server, game_server, token, direction)
  1118.  
  1119. ../../tests/test_s02_time_control.py:180:
  1120. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1121. ../../tests/test_s02_time_control.py:32: in move_players
  1122. server.move(token, direction)
  1123. ../../tests/cpp_server_api.py:312: in move
  1124. self.validate_response(res)
  1125. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1126.  
  1127. res = <Response [400]>
  1128.  
  1129. @staticmethod
  1130. def validate_response(res: requests.Response):
  1131. if res.status_code != 200:
  1132. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1133. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1134.  
  1135. ../../tests/cpp_server_api.py:343: BadRequest
  1136. _____________________ test_move_sequence_one_player[town] ______________________
  1137.  
  1138. docker_server = <cpp_server_api.CppServer object at 0x7f1ced3e42e0>
  1139. game_server = <game_server.GameServer object at 0x7f1ced3e7790>, map_id = 'town'
  1140.  
  1141. def test_move_sequence_one_player(docker_server, game_server, map_id):
  1142. token, _ = add_player(docker_server, game_server, map_id, 'player')
  1143.  
  1144. random.seed(345612) # Заглушка, чтобы не ловить баги. Существует, пока не искоренили баги из решения
  1145. for i in range(0, 10):
  1146. direction = Direction.random_str()
  1147.  
  1148. > move_players(docker_server, game_server, token, direction)
  1149.  
  1150. ../../tests/test_s02_time_control.py:180:
  1151. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1152. ../../tests/test_s02_time_control.py:32: in move_players
  1153. server.move(token, direction)
  1154. ../../tests/cpp_server_api.py:312: in move
  1155. self.validate_response(res)
  1156. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1157.  
  1158. res = <Response [400]>
  1159.  
  1160. @staticmethod
  1161. def validate_response(res: requests.Response):
  1162. if res.status_code != 200:
  1163. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1164. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1165.  
  1166. ../../tests/cpp_server_api.py:343: BadRequest
  1167. _______________________ test_two_players_turns[map1-R-R] _______________________
  1168.  
  1169. docker_server = <cpp_server_api.CppServer object at 0x7f1ced54fee0>
  1170. game_server = <game_server.GameServer object at 0x7f1ced54ee90>
  1171. direction_1 = 'R', direction_2 = 'R', map_id = 'map1'
  1172.  
  1173. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1174. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1175. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1176. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1177. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1178.  
  1179. > move_players(docker_server, game_server, token_1, direction_1)
  1180.  
  1181. ../../tests/test_s02_time_control.py:193:
  1182. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1183. ../../tests/test_s02_time_control.py:32: in move_players
  1184. server.move(token, direction)
  1185. ../../tests/cpp_server_api.py:312: in move
  1186. self.validate_response(res)
  1187. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1188.  
  1189. res = <Response [400]>
  1190.  
  1191. @staticmethod
  1192. def validate_response(res: requests.Response):
  1193. if res.status_code != 200:
  1194. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1195. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1196.  
  1197. ../../tests/cpp_server_api.py:343: BadRequest
  1198. ____________________ test_big_move_one_player[town-60591-D] ____________________
  1199.  
  1200. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b5600>
  1201. game_server = <game_server.GameServer object at 0x7f1cee6b4fd0>, direction = 'D'
  1202. ticks = 60591, map_id = 'town'
  1203.  
  1204. @pytest.mark.randomize(min_num=1000, max_num=100000, ncalls=3)
  1205. @pytest.mark.parametrize('direction', ['R', 'L', 'U', 'D'])
  1206. def test_big_move_one_player(docker_server, game_server, direction, ticks: int, map_id):
  1207. token, _ = add_player(docker_server, game_server, map_id, 'player')
  1208. > move_players(docker_server, game_server, token, direction)
  1209.  
  1210. ../../tests/test_s02_time_control.py:162:
  1211. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1212. ../../tests/test_s02_time_control.py:32: in move_players
  1213. server.move(token, direction)
  1214. ../../tests/cpp_server_api.py:312: in move
  1215. self.validate_response(res)
  1216. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1217.  
  1218. res = <Response [400]>
  1219.  
  1220. @staticmethod
  1221. def validate_response(res: requests.Response):
  1222. if res.status_code != 200:
  1223. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1224. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1225.  
  1226. ../../tests/cpp_server_api.py:343: BadRequest
  1227. _______________________ test_two_players_turns[map1-R-L] _______________________
  1228.  
  1229. docker_server = <cpp_server_api.CppServer object at 0x7f1cee637af0>
  1230. game_server = <game_server.GameServer object at 0x7f1cee635e40>
  1231. direction_1 = 'L', direction_2 = 'R', map_id = 'map1'
  1232.  
  1233. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1234. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1235. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1236. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1237. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1238.  
  1239. > move_players(docker_server, game_server, token_1, direction_1)
  1240.  
  1241. ../../tests/test_s02_time_control.py:193:
  1242. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1243. ../../tests/test_s02_time_control.py:32: in move_players
  1244. server.move(token, direction)
  1245. ../../tests/cpp_server_api.py:312: in move
  1246. self.validate_response(res)
  1247. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1248.  
  1249. res = <Response [400]>
  1250.  
  1251. @staticmethod
  1252. def validate_response(res: requests.Response):
  1253. if res.status_code != 200:
  1254. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1255. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1256.  
  1257. ../../tests/cpp_server_api.py:343: BadRequest
  1258. _______________________ test_two_players_turns[map1-R-D] _______________________
  1259.  
  1260. docker_server = <cpp_server_api.CppServer object at 0x7f1ced3e5990>
  1261. game_server = <game_server.GameServer object at 0x7f1ced3e7d00>
  1262. direction_1 = 'D', direction_2 = 'R', map_id = 'map1'
  1263.  
  1264. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1265. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1266. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1267. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1268. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1269.  
  1270. > move_players(docker_server, game_server, token_1, direction_1)
  1271.  
  1272. ../../tests/test_s02_time_control.py:193:
  1273. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1274. ../../tests/test_s02_time_control.py:32: in move_players
  1275. server.move(token, direction)
  1276. ../../tests/cpp_server_api.py:312: in move
  1277. self.validate_response(res)
  1278. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1279.  
  1280. res = <Response [400]>
  1281.  
  1282. @staticmethod
  1283. def validate_response(res: requests.Response):
  1284. if res.status_code != 200:
  1285. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1286. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1287.  
  1288. ../../tests/cpp_server_api.py:343: BadRequest
  1289. _______________________ test_two_players_turns[map1-R-U] _______________________
  1290.  
  1291. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4fd360>
  1292. game_server = <game_server.GameServer object at 0x7f1ced5a5ff0>
  1293. direction_1 = 'U', direction_2 = 'R', map_id = 'map1'
  1294.  
  1295. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1296. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1297. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1298. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1299. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1300.  
  1301. > move_players(docker_server, game_server, token_1, direction_1)
  1302.  
  1303. ../../tests/test_s02_time_control.py:193:
  1304. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1305. ../../tests/test_s02_time_control.py:32: in move_players
  1306. server.move(token, direction)
  1307. ../../tests/cpp_server_api.py:312: in move
  1308. self.validate_response(res)
  1309. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1310.  
  1311. res = <Response [400]>
  1312.  
  1313. @staticmethod
  1314. def validate_response(res: requests.Response):
  1315. if res.status_code != 200:
  1316. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1317. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1318.  
  1319. ../../tests/cpp_server_api.py:343: BadRequest
  1320. _______________________ test_two_players_turns[map1-L-L] _______________________
  1321.  
  1322. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b5a20>
  1323. game_server = <game_server.GameServer object at 0x7f1cee6b55a0>
  1324. direction_1 = 'L', direction_2 = 'L', map_id = 'map1'
  1325.  
  1326. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1327. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1328. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1329. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1330. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1331.  
  1332. > move_players(docker_server, game_server, token_1, direction_1)
  1333.  
  1334. ../../tests/test_s02_time_control.py:193:
  1335. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1336. ../../tests/test_s02_time_control.py:32: in move_players
  1337. server.move(token, direction)
  1338. ../../tests/cpp_server_api.py:312: in move
  1339. self.validate_response(res)
  1340. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1341.  
  1342. res = <Response [400]>
  1343.  
  1344. @staticmethod
  1345. def validate_response(res: requests.Response):
  1346. if res.status_code != 200:
  1347. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1348. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1349.  
  1350. ../../tests/cpp_server_api.py:343: BadRequest
  1351. _______________________ test_two_players_turns[map1-L-U] _______________________
  1352.  
  1353. docker_server = <cpp_server_api.CppServer object at 0x7f1ced41db70>
  1354. game_server = <game_server.GameServer object at 0x7f1ced41e290>
  1355. direction_1 = 'U', direction_2 = 'L', map_id = 'map1'
  1356.  
  1357. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1358. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1359. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1360. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1361. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1362.  
  1363. > move_players(docker_server, game_server, token_1, direction_1)
  1364.  
  1365. ../../tests/test_s02_time_control.py:193:
  1366. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1367. ../../tests/test_s02_time_control.py:32: in move_players
  1368. server.move(token, direction)
  1369. ../../tests/cpp_server_api.py:312: in move
  1370. self.validate_response(res)
  1371. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1372.  
  1373. res = <Response [400]>
  1374.  
  1375. @staticmethod
  1376. def validate_response(res: requests.Response):
  1377. if res.status_code != 200:
  1378. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1379. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1380.  
  1381. ../../tests/cpp_server_api.py:343: BadRequest
  1382. _______________________ test_two_players_turns[map1-L-R] _______________________
  1383.  
  1384. docker_server = <cpp_server_api.CppServer object at 0x7f1ced3e2ec0>
  1385. game_server = <game_server.GameServer object at 0x7f1ced3e13f0>
  1386. direction_1 = 'R', direction_2 = 'L', map_id = 'map1'
  1387.  
  1388. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1389. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1390. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1391. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1392. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1393.  
  1394. > move_players(docker_server, game_server, token_1, direction_1)
  1395.  
  1396. ../../tests/test_s02_time_control.py:193:
  1397. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1398. ../../tests/test_s02_time_control.py:32: in move_players
  1399. server.move(token, direction)
  1400. ../../tests/cpp_server_api.py:312: in move
  1401. self.validate_response(res)
  1402. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1403.  
  1404. res = <Response [400]>
  1405.  
  1406. @staticmethod
  1407. def validate_response(res: requests.Response):
  1408. if res.status_code != 200:
  1409. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1410. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1411.  
  1412. ../../tests/cpp_server_api.py:343: BadRequest
  1413. _______________________ test_two_players_turns[map1-L-D] _______________________
  1414.  
  1415. docker_server = <cpp_server_api.CppServer object at 0x7f1cee73ee30>
  1416. game_server = <game_server.GameServer object at 0x7f1cee73e650>
  1417. direction_1 = 'D', direction_2 = 'L', map_id = 'map1'
  1418.  
  1419. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1420. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1421. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1422. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1423. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1424.  
  1425. > move_players(docker_server, game_server, token_1, direction_1)
  1426.  
  1427. ../../tests/test_s02_time_control.py:193:
  1428. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1429. ../../tests/test_s02_time_control.py:32: in move_players
  1430. server.move(token, direction)
  1431. ../../tests/cpp_server_api.py:312: in move
  1432. self.validate_response(res)
  1433. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1434.  
  1435. res = <Response [400]>
  1436.  
  1437. @staticmethod
  1438. def validate_response(res: requests.Response):
  1439. if res.status_code != 200:
  1440. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1441. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1442.  
  1443. ../../tests/cpp_server_api.py:343: BadRequest
  1444. _______________________ test_two_players_turns[map1-U-R] _______________________
  1445.  
  1446. docker_server = <cpp_server_api.CppServer object at 0x7f1ced3e4820>
  1447. game_server = <game_server.GameServer object at 0x7f1ced3e6020>
  1448. direction_1 = 'R', direction_2 = 'U', map_id = 'map1'
  1449.  
  1450. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1451. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1452. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1453. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1454. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1455.  
  1456. > move_players(docker_server, game_server, token_1, direction_1)
  1457.  
  1458. ../../tests/test_s02_time_control.py:193:
  1459. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1460. ../../tests/test_s02_time_control.py:32: in move_players
  1461. server.move(token, direction)
  1462. ../../tests/cpp_server_api.py:312: in move
  1463. self.validate_response(res)
  1464. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1465.  
  1466. res = <Response [400]>
  1467.  
  1468. @staticmethod
  1469. def validate_response(res: requests.Response):
  1470. if res.status_code != 200:
  1471. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1472. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1473.  
  1474. ../../tests/cpp_server_api.py:343: BadRequest
  1475. _______________________ test_two_players_turns[map1-U-L] _______________________
  1476.  
  1477. docker_server = <cpp_server_api.CppServer object at 0x7f1ced506920>
  1478. game_server = <game_server.GameServer object at 0x7f1ced507a60>
  1479. direction_1 = 'L', direction_2 = 'U', map_id = 'map1'
  1480.  
  1481. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1482. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1483. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1484. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1485. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1486.  
  1487. > move_players(docker_server, game_server, token_1, direction_1)
  1488.  
  1489. ../../tests/test_s02_time_control.py:193:
  1490. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1491. ../../tests/test_s02_time_control.py:32: in move_players
  1492. server.move(token, direction)
  1493. ../../tests/cpp_server_api.py:312: in move
  1494. self.validate_response(res)
  1495. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1496.  
  1497. res = <Response [400]>
  1498.  
  1499. @staticmethod
  1500. def validate_response(res: requests.Response):
  1501. if res.status_code != 200:
  1502. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1503. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1504.  
  1505. ../../tests/cpp_server_api.py:343: BadRequest
  1506. _______________________ test_two_players_turns[map1-U-U] _______________________
  1507.  
  1508. docker_server = <cpp_server_api.CppServer object at 0x7f1ced54f6a0>
  1509. game_server = <game_server.GameServer object at 0x7f1ced54cd60>
  1510. direction_1 = 'U', direction_2 = 'U', map_id = 'map1'
  1511.  
  1512. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1513. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1514. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1515. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1516. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1517.  
  1518. > move_players(docker_server, game_server, token_1, direction_1)
  1519.  
  1520. ../../tests/test_s02_time_control.py:193:
  1521. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1522. ../../tests/test_s02_time_control.py:32: in move_players
  1523. server.move(token, direction)
  1524. ../../tests/cpp_server_api.py:312: in move
  1525. self.validate_response(res)
  1526. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1527.  
  1528. res = <Response [400]>
  1529.  
  1530. @staticmethod
  1531. def validate_response(res: requests.Response):
  1532. if res.status_code != 200:
  1533. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1534. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1535.  
  1536. ../../tests/cpp_server_api.py:343: BadRequest
  1537. _______________________ test_two_players_turns[map1-U-D] _______________________
  1538.  
  1539. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b71c0>
  1540. game_server = <game_server.GameServer object at 0x7f1cee6b5600>
  1541. direction_1 = 'D', direction_2 = 'U', map_id = 'map1'
  1542.  
  1543. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1544. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1545. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1546. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1547. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1548.  
  1549. > move_players(docker_server, game_server, token_1, direction_1)
  1550.  
  1551. ../../tests/test_s02_time_control.py:193:
  1552. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1553. ../../tests/test_s02_time_control.py:32: in move_players
  1554. server.move(token, direction)
  1555. ../../tests/cpp_server_api.py:312: in move
  1556. self.validate_response(res)
  1557. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1558.  
  1559. res = <Response [400]>
  1560.  
  1561. @staticmethod
  1562. def validate_response(res: requests.Response):
  1563. if res.status_code != 200:
  1564. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1565. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1566.  
  1567. ../../tests/cpp_server_api.py:343: BadRequest
  1568. _______________________ test_two_players_turns[map1-D-R] _______________________
  1569.  
  1570. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a0100>
  1571. game_server = <game_server.GameServer object at 0x7f1cee7a2fb0>
  1572. direction_1 = 'R', direction_2 = 'D', map_id = 'map1'
  1573.  
  1574. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1575. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1576. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1577. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1578. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1579.  
  1580. > move_players(docker_server, game_server, token_1, direction_1)
  1581.  
  1582. ../../tests/test_s02_time_control.py:193:
  1583. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1584. ../../tests/test_s02_time_control.py:32: in move_players
  1585. server.move(token, direction)
  1586. ../../tests/cpp_server_api.py:312: in move
  1587. self.validate_response(res)
  1588. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1589.  
  1590. res = <Response [400]>
  1591.  
  1592. @staticmethod
  1593. def validate_response(res: requests.Response):
  1594. if res.status_code != 200:
  1595. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1596. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1597.  
  1598. ../../tests/cpp_server_api.py:343: BadRequest
  1599. _______________________ test_two_players_turns[map1-D-L] _______________________
  1600.  
  1601. docker_server = <cpp_server_api.CppServer object at 0x7f1cee782290>
  1602. game_server = <game_server.GameServer object at 0x7f1cee7817e0>
  1603. direction_1 = 'L', direction_2 = 'D', map_id = 'map1'
  1604.  
  1605. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1606. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1607. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1608. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1609. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1610.  
  1611. > move_players(docker_server, game_server, token_1, direction_1)
  1612.  
  1613. ../../tests/test_s02_time_control.py:193:
  1614. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1615. ../../tests/test_s02_time_control.py:32: in move_players
  1616. server.move(token, direction)
  1617. ../../tests/cpp_server_api.py:312: in move
  1618. self.validate_response(res)
  1619. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1620.  
  1621. res = <Response [400]>
  1622.  
  1623. @staticmethod
  1624. def validate_response(res: requests.Response):
  1625. if res.status_code != 200:
  1626. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1627. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1628.  
  1629. ../../tests/cpp_server_api.py:343: BadRequest
  1630. _______________________ test_two_players_turns[map1-D-U] _______________________
  1631.  
  1632. docker_server = <cpp_server_api.CppServer object at 0x7f1ced3e0a60>
  1633. game_server = <game_server.GameServer object at 0x7f1ced3e1e10>
  1634. direction_1 = 'U', direction_2 = 'D', map_id = 'map1'
  1635.  
  1636. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1637. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1638. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1639. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1640. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1641.  
  1642. > move_players(docker_server, game_server, token_1, direction_1)
  1643.  
  1644. ../../tests/test_s02_time_control.py:193:
  1645. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1646. ../../tests/test_s02_time_control.py:32: in move_players
  1647. server.move(token, direction)
  1648. ../../tests/cpp_server_api.py:312: in move
  1649. self.validate_response(res)
  1650. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1651.  
  1652. res = <Response [400]>
  1653.  
  1654. @staticmethod
  1655. def validate_response(res: requests.Response):
  1656. if res.status_code != 200:
  1657. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1658. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1659.  
  1660. ../../tests/cpp_server_api.py:343: BadRequest
  1661. _______________________ test_two_players_turns[map1-D-D] _______________________
  1662.  
  1663. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a2440>
  1664. game_server = <game_server.GameServer object at 0x7f1cee7a2f20>
  1665. direction_1 = 'D', direction_2 = 'D', map_id = 'map1'
  1666.  
  1667. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1668. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1669. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1670. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1671. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1672.  
  1673. > move_players(docker_server, game_server, token_1, direction_1)
  1674.  
  1675. ../../tests/test_s02_time_control.py:193:
  1676. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1677. ../../tests/test_s02_time_control.py:32: in move_players
  1678. server.move(token, direction)
  1679. ../../tests/cpp_server_api.py:312: in move
  1680. self.validate_response(res)
  1681. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1682.  
  1683. res = <Response [400]>
  1684.  
  1685. @staticmethod
  1686. def validate_response(res: requests.Response):
  1687. if res.status_code != 200:
  1688. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1689. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1690.  
  1691. ../../tests/cpp_server_api.py:343: BadRequest
  1692. _______________________ test_two_players_turns[town-R-R] _______________________
  1693.  
  1694. docker_server = <cpp_server_api.CppServer object at 0x7f1cee73f790>
  1695. game_server = <game_server.GameServer object at 0x7f1cee73ebc0>
  1696. direction_1 = 'R', direction_2 = 'R', map_id = 'town'
  1697.  
  1698. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1699. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1700. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1701. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1702. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1703.  
  1704. > move_players(docker_server, game_server, token_1, direction_1)
  1705.  
  1706. ../../tests/test_s02_time_control.py:193:
  1707. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1708. ../../tests/test_s02_time_control.py:32: in move_players
  1709. server.move(token, direction)
  1710. ../../tests/cpp_server_api.py:312: in move
  1711. self.validate_response(res)
  1712. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1713.  
  1714. res = <Response [400]>
  1715.  
  1716. @staticmethod
  1717. def validate_response(res: requests.Response):
  1718. if res.status_code != 200:
  1719. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1720. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1721.  
  1722. ../../tests/cpp_server_api.py:343: BadRequest
  1723. _______________________ test_two_players_turns[town-R-L] _______________________
  1724.  
  1725. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5a6920>
  1726. game_server = <game_server.GameServer object at 0x7f1ced5a74c0>
  1727. direction_1 = 'L', direction_2 = 'R', map_id = 'town'
  1728.  
  1729. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1730. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1731. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1732. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1733. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1734.  
  1735. > move_players(docker_server, game_server, token_1, direction_1)
  1736.  
  1737. ../../tests/test_s02_time_control.py:193:
  1738. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1739. ../../tests/test_s02_time_control.py:32: in move_players
  1740. server.move(token, direction)
  1741. ../../tests/cpp_server_api.py:312: in move
  1742. self.validate_response(res)
  1743. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1744.  
  1745. res = <Response [400]>
  1746.  
  1747. @staticmethod
  1748. def validate_response(res: requests.Response):
  1749. if res.status_code != 200:
  1750. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1751. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1752.  
  1753. ../../tests/cpp_server_api.py:343: BadRequest
  1754. _______________________ test_two_players_turns[town-R-U] _______________________
  1755.  
  1756. docker_server = <cpp_server_api.CppServer object at 0x7f1ced561ed0>
  1757. game_server = <game_server.GameServer object at 0x7f1ced563d30>
  1758. direction_1 = 'U', direction_2 = 'R', map_id = 'town'
  1759.  
  1760. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1761. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1762. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1763. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1764. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1765.  
  1766. > move_players(docker_server, game_server, token_1, direction_1)
  1767.  
  1768. ../../tests/test_s02_time_control.py:193:
  1769. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1770. ../../tests/test_s02_time_control.py:32: in move_players
  1771. server.move(token, direction)
  1772. ../../tests/cpp_server_api.py:312: in move
  1773. self.validate_response(res)
  1774. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1775.  
  1776. res = <Response [400]>
  1777.  
  1778. @staticmethod
  1779. def validate_response(res: requests.Response):
  1780. if res.status_code != 200:
  1781. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1782. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1783.  
  1784. ../../tests/cpp_server_api.py:343: BadRequest
  1785. _______________________ test_two_players_turns[town-R-D] _______________________
  1786.  
  1787. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7aa500>
  1788. game_server = <game_server.GameServer object at 0x7f1cee7a8250>
  1789. direction_1 = 'D', direction_2 = 'R', map_id = 'town'
  1790.  
  1791. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1792. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1793. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1794. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1795. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1796.  
  1797. > move_players(docker_server, game_server, token_1, direction_1)
  1798.  
  1799. ../../tests/test_s02_time_control.py:193:
  1800. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1801. ../../tests/test_s02_time_control.py:32: in move_players
  1802. server.move(token, direction)
  1803. ../../tests/cpp_server_api.py:312: in move
  1804. self.validate_response(res)
  1805. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1806.  
  1807. res = <Response [400]>
  1808.  
  1809. @staticmethod
  1810. def validate_response(res: requests.Response):
  1811. if res.status_code != 200:
  1812. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1813. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1814.  
  1815. ../../tests/cpp_server_api.py:343: BadRequest
  1816. _______________________ test_two_players_turns[town-L-R] _______________________
  1817.  
  1818. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b3640>
  1819. game_server = <game_server.GameServer object at 0x7f1cee6b3dc0>
  1820. direction_1 = 'R', direction_2 = 'L', map_id = 'town'
  1821.  
  1822. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1823. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1824. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1825. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1826. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1827.  
  1828. > move_players(docker_server, game_server, token_1, direction_1)
  1829.  
  1830. ../../tests/test_s02_time_control.py:193:
  1831. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1832. ../../tests/test_s02_time_control.py:32: in move_players
  1833. server.move(token, direction)
  1834. ../../tests/cpp_server_api.py:312: in move
  1835. self.validate_response(res)
  1836. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1837.  
  1838. res = <Response [400]>
  1839.  
  1840. @staticmethod
  1841. def validate_response(res: requests.Response):
  1842. if res.status_code != 200:
  1843. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1844. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1845.  
  1846. ../../tests/cpp_server_api.py:343: BadRequest
  1847. _______________________ test_two_players_turns[town-L-U] _______________________
  1848.  
  1849. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4f17e0>
  1850. game_server = <game_server.GameServer object at 0x7f1ced4f1960>
  1851. direction_1 = 'U', direction_2 = 'L', map_id = 'town'
  1852.  
  1853. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1854. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1855. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1856. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1857. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1858.  
  1859. > move_players(docker_server, game_server, token_1, direction_1)
  1860.  
  1861. ../../tests/test_s02_time_control.py:193:
  1862. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1863. ../../tests/test_s02_time_control.py:32: in move_players
  1864. server.move(token, direction)
  1865. ../../tests/cpp_server_api.py:312: in move
  1866. self.validate_response(res)
  1867. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1868.  
  1869. res = <Response [400]>
  1870.  
  1871. @staticmethod
  1872. def validate_response(res: requests.Response):
  1873. if res.status_code != 200:
  1874. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1875. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1876.  
  1877. ../../tests/cpp_server_api.py:343: BadRequest
  1878. _______________________ test_two_players_turns[town-L-L] _______________________
  1879.  
  1880. docker_server = <cpp_server_api.CppServer object at 0x7f1ced460b20>
  1881. game_server = <game_server.GameServer object at 0x7f1ced463d90>
  1882. direction_1 = 'L', direction_2 = 'L', map_id = 'town'
  1883.  
  1884. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1885. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1886. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1887. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1888. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1889.  
  1890. > move_players(docker_server, game_server, token_1, direction_1)
  1891.  
  1892. ../../tests/test_s02_time_control.py:193:
  1893. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1894. ../../tests/test_s02_time_control.py:32: in move_players
  1895. server.move(token, direction)
  1896. ../../tests/cpp_server_api.py:312: in move
  1897. self.validate_response(res)
  1898. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1899.  
  1900. res = <Response [400]>
  1901.  
  1902. @staticmethod
  1903. def validate_response(res: requests.Response):
  1904. if res.status_code != 200:
  1905. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1906. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1907.  
  1908. ../../tests/cpp_server_api.py:343: BadRequest
  1909. _______________________ test_two_players_turns[town-L-D] _______________________
  1910.  
  1911. docker_server = <cpp_server_api.CppServer object at 0x7f1ced562290>
  1912. game_server = <game_server.GameServer object at 0x7f1ced5c1000>
  1913. direction_1 = 'D', direction_2 = 'L', map_id = 'town'
  1914.  
  1915. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1916. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1917. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1918. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1919. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1920.  
  1921. > move_players(docker_server, game_server, token_1, direction_1)
  1922.  
  1923. ../../tests/test_s02_time_control.py:193:
  1924. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1925. ../../tests/test_s02_time_control.py:32: in move_players
  1926. server.move(token, direction)
  1927. ../../tests/cpp_server_api.py:312: in move
  1928. self.validate_response(res)
  1929. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1930.  
  1931. res = <Response [400]>
  1932.  
  1933. @staticmethod
  1934. def validate_response(res: requests.Response):
  1935. if res.status_code != 200:
  1936. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1937. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1938.  
  1939. ../../tests/cpp_server_api.py:343: BadRequest
  1940. _______________________ test_two_players_turns[town-U-L] _______________________
  1941.  
  1942. docker_server = <cpp_server_api.CppServer object at 0x7f1cee634340>
  1943. game_server = <game_server.GameServer object at 0x7f1cee636e30>
  1944. direction_1 = 'L', direction_2 = 'U', map_id = 'town'
  1945.  
  1946. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1947. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1948. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1949. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1950. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1951.  
  1952. > move_players(docker_server, game_server, token_1, direction_1)
  1953.  
  1954. ../../tests/test_s02_time_control.py:193:
  1955. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1956. ../../tests/test_s02_time_control.py:32: in move_players
  1957. server.move(token, direction)
  1958. ../../tests/cpp_server_api.py:312: in move
  1959. self.validate_response(res)
  1960. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1961.  
  1962. res = <Response [400]>
  1963.  
  1964. @staticmethod
  1965. def validate_response(res: requests.Response):
  1966. if res.status_code != 200:
  1967. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1968. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  1969.  
  1970. ../../tests/cpp_server_api.py:343: BadRequest
  1971. _______________________ test_two_players_turns[town-U-R] _______________________
  1972.  
  1973. docker_server = <cpp_server_api.CppServer object at 0x7f1cee636e30>
  1974. game_server = <game_server.GameServer object at 0x7f1cee637040>
  1975. direction_1 = 'R', direction_2 = 'U', map_id = 'town'
  1976.  
  1977. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  1978. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  1979. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  1980. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  1981. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  1982.  
  1983. > move_players(docker_server, game_server, token_1, direction_1)
  1984.  
  1985. ../../tests/test_s02_time_control.py:193:
  1986. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1987. ../../tests/test_s02_time_control.py:32: in move_players
  1988. server.move(token, direction)
  1989. ../../tests/cpp_server_api.py:312: in move
  1990. self.validate_response(res)
  1991. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1992.  
  1993. res = <Response [400]>
  1994.  
  1995. @staticmethod
  1996. def validate_response(res: requests.Response):
  1997. if res.status_code != 200:
  1998. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  1999. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2000.  
  2001. ../../tests/cpp_server_api.py:343: BadRequest
  2002. _______________________ test_two_players_turns[town-U-D] _______________________
  2003.  
  2004. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7a8dc0>
  2005. game_server = <game_server.GameServer object at 0x7f1cee7aa5c0>
  2006. direction_1 = 'D', direction_2 = 'U', map_id = 'town'
  2007.  
  2008. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  2009. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  2010. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  2011. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2012. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2013.  
  2014. > move_players(docker_server, game_server, token_1, direction_1)
  2015.  
  2016. ../../tests/test_s02_time_control.py:193:
  2017. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2018. ../../tests/test_s02_time_control.py:32: in move_players
  2019. server.move(token, direction)
  2020. ../../tests/cpp_server_api.py:312: in move
  2021. self.validate_response(res)
  2022. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2023.  
  2024. res = <Response [400]>
  2025.  
  2026. @staticmethod
  2027. def validate_response(res: requests.Response):
  2028. if res.status_code != 200:
  2029. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  2030. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2031.  
  2032. ../../tests/cpp_server_api.py:343: BadRequest
  2033. _______________________ test_two_players_turns[town-U-U] _______________________
  2034.  
  2035. docker_server = <cpp_server_api.CppServer object at 0x7f1ced511570>
  2036. game_server = <game_server.GameServer object at 0x7f1ced5108e0>
  2037. direction_1 = 'U', direction_2 = 'U', map_id = 'town'
  2038.  
  2039. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  2040. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  2041. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  2042. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2043. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2044.  
  2045. > move_players(docker_server, game_server, token_1, direction_1)
  2046.  
  2047. ../../tests/test_s02_time_control.py:193:
  2048. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2049. ../../tests/test_s02_time_control.py:32: in move_players
  2050. server.move(token, direction)
  2051. ../../tests/cpp_server_api.py:312: in move
  2052. self.validate_response(res)
  2053. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2054.  
  2055. res = <Response [400]>
  2056.  
  2057. @staticmethod
  2058. def validate_response(res: requests.Response):
  2059. if res.status_code != 200:
  2060. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  2061. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2062.  
  2063. ../../tests/cpp_server_api.py:343: BadRequest
  2064. _______________________ test_two_players_turns[town-D-R] _______________________
  2065.  
  2066. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4c2a10>
  2067. game_server = <game_server.GameServer object at 0x7f1ced4c2b60>
  2068. direction_1 = 'R', direction_2 = 'D', map_id = 'town'
  2069.  
  2070. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  2071. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  2072. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  2073. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2074. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2075.  
  2076. > move_players(docker_server, game_server, token_1, direction_1)
  2077.  
  2078. ../../tests/test_s02_time_control.py:193:
  2079. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2080. ../../tests/test_s02_time_control.py:32: in move_players
  2081. server.move(token, direction)
  2082. ../../tests/cpp_server_api.py:312: in move
  2083. self.validate_response(res)
  2084. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2085.  
  2086. res = <Response [400]>
  2087.  
  2088. @staticmethod
  2089. def validate_response(res: requests.Response):
  2090. if res.status_code != 200:
  2091. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  2092. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2093.  
  2094. ../../tests/cpp_server_api.py:343: BadRequest
  2095. _______________________ test_two_players_turns[town-D-L] _______________________
  2096.  
  2097. docker_server = <cpp_server_api.CppServer object at 0x7f1cee7820b0>
  2098. game_server = <game_server.GameServer object at 0x7f1cee7827d0>
  2099. direction_1 = 'L', direction_2 = 'D', map_id = 'town'
  2100.  
  2101. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  2102. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  2103. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  2104. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2105. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2106.  
  2107. > move_players(docker_server, game_server, token_1, direction_1)
  2108.  
  2109. ../../tests/test_s02_time_control.py:193:
  2110. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2111. ../../tests/test_s02_time_control.py:32: in move_players
  2112. server.move(token, direction)
  2113. ../../tests/cpp_server_api.py:312: in move
  2114. self.validate_response(res)
  2115. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2116.  
  2117. res = <Response [400]>
  2118.  
  2119. @staticmethod
  2120. def validate_response(res: requests.Response):
  2121. if res.status_code != 200:
  2122. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  2123. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2124.  
  2125. ../../tests/cpp_server_api.py:343: BadRequest
  2126. _______________________ test_two_players_turns[town-D-U] _______________________
  2127.  
  2128. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5043d0>
  2129. game_server = <game_server.GameServer object at 0x7f1ced506050>
  2130. direction_1 = 'U', direction_2 = 'D', map_id = 'town'
  2131.  
  2132. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  2133. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  2134. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  2135. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2136. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2137.  
  2138. > move_players(docker_server, game_server, token_1, direction_1)
  2139.  
  2140. ../../tests/test_s02_time_control.py:193:
  2141. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2142. ../../tests/test_s02_time_control.py:32: in move_players
  2143. server.move(token, direction)
  2144. ../../tests/cpp_server_api.py:312: in move
  2145. self.validate_response(res)
  2146. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2147.  
  2148. res = <Response [400]>
  2149.  
  2150. @staticmethod
  2151. def validate_response(res: requests.Response):
  2152. if res.status_code != 200:
  2153. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  2154. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2155.  
  2156. ../../tests/cpp_server_api.py:343: BadRequest
  2157. _______________________ test_two_players_turns[town-D-D] _______________________
  2158.  
  2159. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6a93f0>
  2160. game_server = <game_server.GameServer object at 0x7f1cee6aa1a0>
  2161. direction_1 = 'D', direction_2 = 'D', map_id = 'town'
  2162.  
  2163. @pytest.mark.parametrize('direction_1', ['R', 'L', 'U', 'D'])
  2164. @pytest.mark.parametrize('direction_2', ['R', 'L', 'U', 'D'])
  2165. def test_two_players_turns(docker_server, game_server, direction_1, direction_2, map_id):
  2166. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2167. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2168.  
  2169. > move_players(docker_server, game_server, token_1, direction_1)
  2170.  
  2171. ../../tests/test_s02_time_control.py:193:
  2172. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2173. ../../tests/test_s02_time_control.py:32: in move_players
  2174. server.move(token, direction)
  2175. ../../tests/cpp_server_api.py:312: in move
  2176. self.validate_response(res)
  2177. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2178.  
  2179. res = <Response [400]>
  2180.  
  2181. @staticmethod
  2182. def validate_response(res: requests.Response):
  2183. if res.status_code != 200:
  2184. > raise BadRequest('Status code isn\'t OK', {'status code': res.status_code, 'response': res.content})
  2185. E cpp_server_api.BadRequest: <unprintable BadRequest object>
  2186.  
  2187. ../../tests/cpp_server_api.py:343: BadRequest
  2188. ____________________ test_two_players_small_move[map1-151] _____________________
  2189.  
  2190. docker_server = <cpp_server_api.CppServer object at 0x7f1cee635510>
  2191. game_server = <game_server.GameServer object at 0x7f1cee634790>, map_id = 'map1'
  2192. ticks = 151
  2193.  
  2194. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  2195. def test_two_players_small_move(docker_server, game_server, map_id, ticks: int):
  2196. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2197. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2198. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2199. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2200.  
  2201. > compare_states(state_1, py_state_1)
  2202.  
  2203. ../../tests/test_s02_time_control.py:210:
  2204. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2205.  
  2206. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2207. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2208.  
  2209. def compare_states(cpp_state: dict, py_state: dict):
  2210. cpp_players: dict = cpp_state['players']
  2211. py_players: dict = py_state['players']
  2212. assert cpp_players.keys() == py_players.keys()
  2213.  
  2214. for player_id in cpp_players:
  2215. cpp_player: dict = cpp_players[player_id]
  2216. py_player: dict = py_players[player_id]
  2217.  
  2218. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2219. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2220. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2221. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2222. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2223.  
  2224. ../../tests/test_s02_time_control.py:58: AssertionError
  2225. _____________________ test_two_players_small_move[map1-19] _____________________
  2226.  
  2227. docker_server = <cpp_server_api.CppServer object at 0x7f1ced3ec460>
  2228. game_server = <game_server.GameServer object at 0x7f1ced3ed720>, map_id = 'map1'
  2229. ticks = 19
  2230.  
  2231. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  2232. def test_two_players_small_move(docker_server, game_server, map_id, ticks: int):
  2233. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2234. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2235. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2236. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2237.  
  2238. > compare_states(state_1, py_state_1)
  2239.  
  2240. ../../tests/test_s02_time_control.py:210:
  2241. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2242.  
  2243. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2244. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2245.  
  2246. def compare_states(cpp_state: dict, py_state: dict):
  2247. cpp_players: dict = cpp_state['players']
  2248. py_players: dict = py_state['players']
  2249. assert cpp_players.keys() == py_players.keys()
  2250.  
  2251. for player_id in cpp_players:
  2252. cpp_player: dict = cpp_players[player_id]
  2253. py_player: dict = py_players[player_id]
  2254.  
  2255. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2256. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2257. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2258. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2259. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2260.  
  2261. ../../tests/test_s02_time_control.py:58: AssertionError
  2262. _____________________ test_two_players_small_move[map1-29] _____________________
  2263.  
  2264. docker_server = <cpp_server_api.CppServer object at 0x7f1ced4c25f0>
  2265. game_server = <game_server.GameServer object at 0x7f1ced4c3be0>, map_id = 'map1'
  2266. ticks = 29
  2267.  
  2268. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  2269. def test_two_players_small_move(docker_server, game_server, map_id, ticks: int):
  2270. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2271. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2272. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2273. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2274.  
  2275. > compare_states(state_1, py_state_1)
  2276.  
  2277. ../../tests/test_s02_time_control.py:210:
  2278. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2279.  
  2280. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2281. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2282.  
  2283. def compare_states(cpp_state: dict, py_state: dict):
  2284. cpp_players: dict = cpp_state['players']
  2285. py_players: dict = py_state['players']
  2286. assert cpp_players.keys() == py_players.keys()
  2287.  
  2288. for player_id in cpp_players:
  2289. cpp_player: dict = cpp_players[player_id]
  2290. py_player: dict = py_players[player_id]
  2291.  
  2292. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2293. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2294. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2295. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2296. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2297.  
  2298. ../../tests/test_s02_time_control.py:58: AssertionError
  2299. ____________________ test_two_players_small_move[town-151] _____________________
  2300.  
  2301. docker_server = <cpp_server_api.CppServer object at 0x7f1cee77f040>
  2302. game_server = <game_server.GameServer object at 0x7f1cee73eec0>, map_id = 'town'
  2303. ticks = 151
  2304.  
  2305. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  2306. def test_two_players_small_move(docker_server, game_server, map_id, ticks: int):
  2307. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2308. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2309. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2310. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2311.  
  2312. > compare_states(state_1, py_state_1)
  2313.  
  2314. ../../tests/test_s02_time_control.py:210:
  2315. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2316.  
  2317. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2318. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2319.  
  2320. def compare_states(cpp_state: dict, py_state: dict):
  2321. cpp_players: dict = cpp_state['players']
  2322. py_players: dict = py_state['players']
  2323. assert cpp_players.keys() == py_players.keys()
  2324.  
  2325. for player_id in cpp_players:
  2326. cpp_player: dict = cpp_players[player_id]
  2327. py_player: dict = py_players[player_id]
  2328.  
  2329. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2330. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2331. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2332. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2333. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2334.  
  2335. ../../tests/test_s02_time_control.py:58: AssertionError
  2336. _____________________ test_two_players_small_move[town-19] _____________________
  2337.  
  2338. docker_server = <cpp_server_api.CppServer object at 0x7f1cee6b4640>
  2339. game_server = <game_server.GameServer object at 0x7f1cee6b4790>, map_id = 'town'
  2340. ticks = 19
  2341.  
  2342. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  2343. def test_two_players_small_move(docker_server, game_server, map_id, ticks: int):
  2344. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2345. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2346. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2347. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2348.  
  2349. > compare_states(state_1, py_state_1)
  2350.  
  2351. ../../tests/test_s02_time_control.py:210:
  2352. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2353.  
  2354. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2355. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2356.  
  2357. def compare_states(cpp_state: dict, py_state: dict):
  2358. cpp_players: dict = cpp_state['players']
  2359. py_players: dict = py_state['players']
  2360. assert cpp_players.keys() == py_players.keys()
  2361.  
  2362. for player_id in cpp_players:
  2363. cpp_player: dict = cpp_players[player_id]
  2364. py_player: dict = py_players[player_id]
  2365.  
  2366. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2367. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2368. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2369. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2370. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2371.  
  2372. ../../tests/test_s02_time_control.py:58: AssertionError
  2373. _____________________ test_two_players_small_move[town-29] _____________________
  2374.  
  2375. docker_server = <cpp_server_api.CppServer object at 0x7f1ced486470>
  2376. game_server = <game_server.GameServer object at 0x7f1ced487be0>, map_id = 'town'
  2377. ticks = 29
  2378.  
  2379. @pytest.mark.randomize(min_num=0, max_num=250, ncalls=3)
  2380. def test_two_players_small_move(docker_server, game_server, map_id, ticks: int):
  2381. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2382. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2383. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2384. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2385.  
  2386. > compare_states(state_1, py_state_1)
  2387.  
  2388. ../../tests/test_s02_time_control.py:210:
  2389. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2390.  
  2391. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2392. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2393.  
  2394. def compare_states(cpp_state: dict, py_state: dict):
  2395. cpp_players: dict = cpp_state['players']
  2396. py_players: dict = py_state['players']
  2397. assert cpp_players.keys() == py_players.keys()
  2398.  
  2399. for player_id in cpp_players:
  2400. cpp_player: dict = cpp_players[player_id]
  2401. py_player: dict = py_players[player_id]
  2402.  
  2403. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2404. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2405. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2406. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2407. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2408.  
  2409. ../../tests/test_s02_time_control.py:58: AssertionError
  2410. _____________________ test_two_players_big_move[map1-2196] _____________________
  2411.  
  2412. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5c2b60>
  2413. game_server = <game_server.GameServer object at 0x7f1ced5c1480>, map_id = 'map1'
  2414. ticks = 2196
  2415.  
  2416. @pytest.mark.randomize(min_num=250, max_num=10000, ncalls=3)
  2417. def test_two_players_big_move(docker_server, game_server, map_id, ticks: int):
  2418. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2419. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2420. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2421. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2422.  
  2423. > compare_states(state_1, py_state_1)
  2424.  
  2425. ../../tests/test_s02_time_control.py:237:
  2426. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2427.  
  2428. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2429. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2430.  
  2431. def compare_states(cpp_state: dict, py_state: dict):
  2432. cpp_players: dict = cpp_state['players']
  2433. py_players: dict = py_state['players']
  2434. assert cpp_players.keys() == py_players.keys()
  2435.  
  2436. for player_id in cpp_players:
  2437. cpp_player: dict = cpp_players[player_id]
  2438. py_player: dict = py_players[player_id]
  2439.  
  2440. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2441. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2442. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2443. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2444. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2445.  
  2446. ../../tests/test_s02_time_control.py:58: AssertionError
  2447. _____________________ test_two_players_big_move[map1-8621] _____________________
  2448.  
  2449. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5c1ff0>
  2450. game_server = <game_server.GameServer object at 0x7f1ced5c1ba0>, map_id = 'map1'
  2451. ticks = 8621
  2452.  
  2453. @pytest.mark.randomize(min_num=250, max_num=10000, ncalls=3)
  2454. def test_two_players_big_move(docker_server, game_server, map_id, ticks: int):
  2455. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2456. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2457. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2458. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2459.  
  2460. > compare_states(state_1, py_state_1)
  2461.  
  2462. ../../tests/test_s02_time_control.py:237:
  2463. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2464.  
  2465. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2466. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2467.  
  2468. def compare_states(cpp_state: dict, py_state: dict):
  2469. cpp_players: dict = cpp_state['players']
  2470. py_players: dict = py_state['players']
  2471. assert cpp_players.keys() == py_players.keys()
  2472.  
  2473. for player_id in cpp_players:
  2474. cpp_player: dict = cpp_players[player_id]
  2475. py_player: dict = py_players[player_id]
  2476.  
  2477. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2478. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2479. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2480. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2481. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2482.  
  2483. ../../tests/test_s02_time_control.py:58: AssertionError
  2484. _____________________ test_two_players_big_move[map1-8866] _____________________
  2485.  
  2486. docker_server = <cpp_server_api.CppServer object at 0x7f1ced596590>
  2487. game_server = <game_server.GameServer object at 0x7f1ced594a90>, map_id = 'map1'
  2488. ticks = 8866
  2489.  
  2490. @pytest.mark.randomize(min_num=250, max_num=10000, ncalls=3)
  2491. def test_two_players_big_move(docker_server, game_server, map_id, ticks: int):
  2492. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2493. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2494. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2495. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2496.  
  2497. > compare_states(state_1, py_state_1)
  2498.  
  2499. ../../tests/test_s02_time_control.py:237:
  2500. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2501.  
  2502. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2503. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2504.  
  2505. def compare_states(cpp_state: dict, py_state: dict):
  2506. cpp_players: dict = cpp_state['players']
  2507. py_players: dict = py_state['players']
  2508. assert cpp_players.keys() == py_players.keys()
  2509.  
  2510. for player_id in cpp_players:
  2511. cpp_player: dict = cpp_players[player_id]
  2512. py_player: dict = py_players[player_id]
  2513.  
  2514. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2515. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2516. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2517. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2518. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2519.  
  2520. ../../tests/test_s02_time_control.py:58: AssertionError
  2521. _____________________ test_two_players_big_move[town-2196] _____________________
  2522.  
  2523. docker_server = <cpp_server_api.CppServer object at 0x7f1ced486fe0>
  2524. game_server = <game_server.GameServer object at 0x7f1ced484610>, map_id = 'town'
  2525. ticks = 2196
  2526.  
  2527. @pytest.mark.randomize(min_num=250, max_num=10000, ncalls=3)
  2528. def test_two_players_big_move(docker_server, game_server, map_id, ticks: int):
  2529. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2530. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2531. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2532. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2533.  
  2534. > compare_states(state_1, py_state_1)
  2535.  
  2536. ../../tests/test_s02_time_control.py:237:
  2537. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2538.  
  2539. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2540. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2541.  
  2542. def compare_states(cpp_state: dict, py_state: dict):
  2543. cpp_players: dict = cpp_state['players']
  2544. py_players: dict = py_state['players']
  2545. assert cpp_players.keys() == py_players.keys()
  2546.  
  2547. for player_id in cpp_players:
  2548. cpp_player: dict = cpp_players[player_id]
  2549. py_player: dict = py_players[player_id]
  2550.  
  2551. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2552. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2553. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2554. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2555. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2556.  
  2557. ../../tests/test_s02_time_control.py:58: AssertionError
  2558. _____________________ test_two_players_big_move[town-8621] _____________________
  2559.  
  2560. docker_server = <cpp_server_api.CppServer object at 0x7f1ced507af0>
  2561. game_server = <game_server.GameServer object at 0x7f1cef3ce2c0>, map_id = 'town'
  2562. ticks = 8621
  2563.  
  2564. @pytest.mark.randomize(min_num=250, max_num=10000, ncalls=3)
  2565. def test_two_players_big_move(docker_server, game_server, map_id, ticks: int):
  2566. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2567. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2568. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2569. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2570.  
  2571. > compare_states(state_1, py_state_1)
  2572.  
  2573. ../../tests/test_s02_time_control.py:237:
  2574. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2575.  
  2576. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2577. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2578.  
  2579. def compare_states(cpp_state: dict, py_state: dict):
  2580. cpp_players: dict = cpp_state['players']
  2581. py_players: dict = py_state['players']
  2582. assert cpp_players.keys() == py_players.keys()
  2583.  
  2584. for player_id in cpp_players:
  2585. cpp_player: dict = cpp_players[player_id]
  2586. py_player: dict = py_players[player_id]
  2587.  
  2588. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2589. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2590. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2591. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2592. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2593.  
  2594. ../../tests/test_s02_time_control.py:58: AssertionError
  2595. _______________________ test_two_players_sequences[map1] _______________________
  2596.  
  2597. docker_server = <cpp_server_api.CppServer object at 0x7f1cee73d750>
  2598. game_server = <game_server.GameServer object at 0x7f1cee73e7a0>, map_id = 'map1'
  2599.  
  2600. def test_two_players_sequences(docker_server, game_server, map_id):
  2601. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2602. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2603. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2604. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2605.  
  2606. > compare_states(state_1, py_state_1)
  2607.  
  2608. ../../tests/test_s02_time_control.py:262:
  2609. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2610.  
  2611. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -4.0]}}}
  2612. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2613.  
  2614. def compare_states(cpp_state: dict, py_state: dict):
  2615. cpp_players: dict = cpp_state['players']
  2616. py_players: dict = py_state['players']
  2617. assert cpp_players.keys() == py_players.keys()
  2618.  
  2619. for player_id in cpp_players:
  2620. cpp_player: dict = cpp_players[player_id]
  2621. py_player: dict = py_players[player_id]
  2622.  
  2623. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2624. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2625. E assert Vector2D(x=0.0, y=-4.0) == Vector2D(x=0.0, y=0.0)
  2626. E + where Vector2D(x=0.0, y=-4.0) = Vector2D(*[0.0, -4.0])
  2627. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2628.  
  2629. ../../tests/test_s02_time_control.py:58: AssertionError
  2630. _______________________ test_two_players_sequences[town] _______________________
  2631.  
  2632. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5a73a0>
  2633. game_server = <game_server.GameServer object at 0x7f1ced5a4250>, map_id = 'town'
  2634.  
  2635. def test_two_players_sequences(docker_server, game_server, map_id):
  2636. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2637. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2638. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2639. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2640.  
  2641. > compare_states(state_1, py_state_1)
  2642.  
  2643. ../../tests/test_s02_time_control.py:262:
  2644. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2645.  
  2646. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2647. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2648.  
  2649. def compare_states(cpp_state: dict, py_state: dict):
  2650. cpp_players: dict = cpp_state['players']
  2651. py_players: dict = py_state['players']
  2652. assert cpp_players.keys() == py_players.keys()
  2653.  
  2654. for player_id in cpp_players:
  2655. cpp_player: dict = cpp_players[player_id]
  2656. py_player: dict = py_players[player_id]
  2657.  
  2658. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2659. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2660. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2661. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2662. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2663.  
  2664. ../../tests/test_s02_time_control.py:58: AssertionError
  2665. _____________________ test_two_players_big_move[town-8866] _____________________
  2666.  
  2667. docker_server = <cpp_server_api.CppServer object at 0x7f1ced5c1150>
  2668. game_server = <game_server.GameServer object at 0x7f1ced5c0a00>, map_id = 'town'
  2669. ticks = 8866
  2670.  
  2671. @pytest.mark.randomize(min_num=250, max_num=10000, ncalls=3)
  2672. def test_two_players_big_move(docker_server, game_server, map_id, ticks: int):
  2673. token_1, _ = add_player(docker_server, game_server, map_id, 'Player 1')
  2674. token_2, _ = add_player(docker_server, game_server, map_id, 'Player 2')
  2675. state_1, py_state_1 = get_states(docker_server, game_server, token_1)
  2676. state_2, py_state_2 = get_states(docker_server, game_server, token_2)
  2677.  
  2678. > compare_states(state_1, py_state_1)
  2679.  
  2680. ../../tests/test_s02_time_control.py:237:
  2681. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2682.  
  2683. cpp_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, -3.0]}}}
  2684. py_state = {'players': {'0': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}, '1': {'dir': 'U', 'pos': [0.0, 0.0], 'speed': [0.0, 0.0]}}}
  2685.  
  2686. def compare_states(cpp_state: dict, py_state: dict):
  2687. cpp_players: dict = cpp_state['players']
  2688. py_players: dict = py_state['players']
  2689. assert cpp_players.keys() == py_players.keys()
  2690.  
  2691. for player_id in cpp_players:
  2692. cpp_player: dict = cpp_players[player_id]
  2693. py_player: dict = py_players[player_id]
  2694.  
  2695. assert Point(*cpp_player['pos']) == Point(*py_player['pos'])
  2696. > assert Vector2D(*cpp_player['speed']) == Vector2D(*py_player['speed'])
  2697. E assert Vector2D(x=0.0, y=-3.0) == Vector2D(x=0.0, y=0.0)
  2698. E + where Vector2D(x=0.0, y=-3.0) = Vector2D(*[0.0, -3.0])
  2699. E + and Vector2D(x=0.0, y=0.0) = Vector2D(*[0.0, 0.0])
  2700.  
  2701. ../../tests/test_s02_time_control.py:58: AssertionError
  2702. =============================== warnings summary ===============================
  2703. ../../../../../../usr/local/lib/python3.10/dist-packages/pytest_quickcheck/plugin.py:112
  2704. ../../../../../../usr/local/lib/python3.10/dist-packages/pytest_quickcheck/plugin.py:112
  2705. ../../../../../../usr/local/lib/python3.10/dist-packages/pytest_quickcheck/plugin.py:112
  2706. ../../../../../../usr/local/lib/python3.10/dist-packages/pytest_quickcheck/plugin.py:112
  2707. /usr/local/lib/python3.10/dist-packages/pytest_quickcheck/plugin.py:112: PytestDeprecationWarning: A private pytest class or function was used.
  2708. _randomize = Mark("randomize", args, {})
  2709.  
  2710. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
  2711. ------- generated xml file: /__w/cppbackend/cppbackend/time_control.xml --------
  2712. =========================== short test summary info ============================
  2713. FAILED ../../tests/test_s02_time_control.py::test_match_roads - cpp_server_ap...
  2714. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[map1-L] - c...
  2715. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[map1-R] - c...
  2716. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[map1-U] - c...
  2717. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[map1-D] - c...
  2718. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[town-R] - c...
  2719. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[town-L] - c...
  2720. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[town-U] - c...
  2721. FAILED ../../tests/test_s02_time_control.py::test_turn_one_player[town-D] - c...
  2722. FAILED ../../tests/test_s02_time_control.py::test_small_move_one_player[R] - ...
  2723. FAILED ../../tests/test_s02_time_control.py::test_small_move_one_player[U] - ...
  2724. FAILED ../../tests/test_s02_time_control.py::test_small_move_one_player[D] - ...
  2725. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-48289-R]
  2726. FAILED ../../tests/test_s02_time_control.py::test_small_move_one_player[L] - ...
  2727. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-48289-L]
  2728. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-48289-U]
  2729. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-59164-R]
  2730. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-59164-L]
  2731. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-59164-U]
  2732. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-59164-D]
  2733. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-48289-D]
  2734. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-60591-L]
  2735. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-60591-U]
  2736. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-60591-D]
  2737. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-48289-R]
  2738. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[map1-60591-R]
  2739. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-48289-L]
  2740. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-48289-U]
  2741. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-48289-D]
  2742. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-59164-R]
  2743. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-59164-L]
  2744. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-59164-U]
  2745. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-59164-D]
  2746. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-60591-R]
  2747. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-60591-L]
  2748. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-60591-U]
  2749. FAILED ../../tests/test_s02_time_control.py::test_move_sequence_one_player[map1]
  2750. FAILED ../../tests/test_s02_time_control.py::test_move_sequence_one_player[town]
  2751. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-R-R]
  2752. FAILED ../../tests/test_s02_time_control.py::test_big_move_one_player[town-60591-D]
  2753. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-R-L]
  2754. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-R-D]
  2755. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-R-U]
  2756. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-L-L]
  2757. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-L-U]
  2758. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-L-R]
  2759. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-L-D]
  2760. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-U-R]
  2761. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-U-L]
  2762. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-U-U]
  2763. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-U-D]
  2764. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-D-R]
  2765. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-D-L]
  2766. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-D-U]
  2767. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[map1-D-D]
  2768. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-R-R]
  2769. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-R-L]
  2770. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-R-U]
  2771. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-R-D]
  2772. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-L-R]
  2773. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-L-U]
  2774. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-L-L]
  2775. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-L-D]
  2776. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-U-L]
  2777. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-U-R]
  2778. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-U-D]
  2779. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-U-U]
  2780. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-D-R]
  2781. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-D-L]
  2782. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-D-U]
  2783. FAILED ../../tests/test_s02_time_control.py::test_two_players_turns[town-D-D]
  2784. FAILED ../../tests/test_s02_time_control.py::test_two_players_small_move[map1-151]
  2785. FAILED ../../tests/test_s02_time_control.py::test_two_players_small_move[map1-19]
  2786. FAILED ../../tests/test_s02_time_control.py::test_two_players_small_move[map1-29]
  2787. FAILED ../../tests/test_s02_time_control.py::test_two_players_small_move[town-151]
  2788. FAILED ../../tests/test_s02_time_control.py::test_two_players_small_move[town-19]
  2789. FAILED ../../tests/test_s02_time_control.py::test_two_players_small_move[town-29]
  2790. FAILED ../../tests/test_s02_time_control.py::test_two_players_big_move[map1-2196]
  2791. FAILED ../../tests/test_s02_time_control.py::test_two_players_big_move[map1-8621]
  2792. FAILED ../../tests/test_s02_time_control.py::test_two_players_big_move[map1-8866]
  2793. FAILED ../../tests/test_s02_time_control.py::test_two_players_big_move[town-2196]
  2794. FAILED ../../tests/test_s02_time_control.py::test_two_players_big_move[town-8621]
  2795. FAILED ../../tests/test_s02_time_control.py::test_two_players_sequences[map1]
  2796. FAILED ../../tests/test_s02_time_control.py::test_two_players_sequences[town]
  2797. FAILED ../../tests/test_s02_time_control.py::test_two_players_big_move[town-8866]
  2798. ================== 85 failed, 20 passed, 4 warnings in 33.69s ==================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement