AttackingOrDefending commited on
Commit
7de9da3
·
1 Parent(s): 8374797

Minor changes to GitHub Actions Tests (#24)

Browse files
Files changed (1) hide show
  1. tests.py +11 -11
tests.py CHANGED
@@ -41,20 +41,20 @@ def run_bot(CONFIG, logging_level):
41
  time.sleep(2)
42
  while li.get_ongoing_games():
43
  time.sleep(60)
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  @pytest.mark.timeout(300)
46
  def run_test():
47
- game_id = li.challenge_ai()['id']
48
- time.sleep(2)
49
- games = li.get_ongoing_games()
50
- game_ids = list(map(lambda game: game['gameId'], games))
51
- for game in game_ids:
52
- if game != game_id:
53
- try:
54
- li.abort(game)
55
- except:
56
- pass
57
- time.sleep(2)
58
  lishogi_bot.start(li, user_profile, engine_factory, CONFIG, logging_level, None, one_game=True)
59
  response = requests.get('https://lishogi.org/game/export/{}'.format(game_id))
60
  response = response.text
 
41
  time.sleep(2)
42
  while li.get_ongoing_games():
43
  time.sleep(60)
44
+ game_id = li.challenge_ai()['id']
45
+ time.sleep(2)
46
+ games = li.get_ongoing_games()
47
+ game_ids = list(map(lambda game: game['gameId'], games))
48
+ for game in game_ids:
49
+ if game != game_id:
50
+ try:
51
+ li.abort(game)
52
+ except:
53
+ pass
54
+ time.sleep(2)
55
 
56
  @pytest.mark.timeout(300)
57
  def run_test():
 
 
 
 
 
 
 
 
 
 
 
58
  lishogi_bot.start(li, user_profile, engine_factory, CONFIG, logging_level, None, one_game=True)
59
  response = requests.get('https://lishogi.org/game/export/{}'.format(game_id))
60
  response = response.text