Skip to content

Commit e8a5dd7

Browse files
Extend the smoke test to include screen capture
1 parent d74554c commit e8a5dd7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

atari_py/tests/test_smoke.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import atari_py
2+
import numpy as np
23

34
def test_smoke():
45
pong_path = atari_py.get_game_path('pong')
56
ale = atari_py.ALEInterface()
67
ale.loadROM(pong_path)
78
action_set = ale.getMinimalActionSet()
9+
10+
# Test stepping
811
ale.act(action_set[0])
12+
13+
# Test screen capture
14+
(screen_width,screen_height) = ale.getScreenDims()
15+
arr = np.zeros((screen_height, screen_width, 4), dtype=np.uint8)
16+
ale.getScreenRGB(arr)

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ envlist = py27, py35
88

99
[testenv:py35]
1010
whitelist_externals=make
11+
echo
1112
install_command=echo {packages}
1213
deps =
1314
nose2

0 commit comments

Comments
 (0)