From 9340a4539394e1ae6a18b5d860dd7a45ec44bccf Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 25 Jan 2018 00:48:37 +0900 Subject: [PATCH] test: Don't use os.errno. Use errno directly --- tests/test_ext_math.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py index 9bbd6217d..1cdf4d637 100644 --- a/tests/test_ext_math.py +++ b/tests/test_ext_math.py @@ -11,6 +11,7 @@ import os import re +import errno import subprocess import pytest @@ -20,7 +21,7 @@ def has_binary(binary): try: subprocess.check_output([binary]) except OSError as e: - if e.errno == os.errno.ENOENT: + if e.errno == errno.ENOENT: # handle file not found error. return False else: