Skip to content

Commit

Permalink
Fix test for Python 3.5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceone committed Jul 10, 2016
1 parent 8809516 commit 4f3eb90
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/core/test_signals.py
Expand Up @@ -59,11 +59,10 @@ def test(tmpdir):
kill(pid, SIGTERM)
wait(pid)

f = open(signalfile, "r")
signal = f.read().strip()
f.close()
with open(signalfile, "r") as fd:
signal = fd.read().strip()

assert signal == str(SIGTERM)
assert int(signal) == int(SIGTERM)

remove(pidfile)
remove(signalfile)

0 comments on commit 4f3eb90

Please sign in to comment.