summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Eades <danieleades@hotmail.com>2022-01-10 13:51:35 +0000
committerDaniel Eades <danieleades@hotmail.com>2022-01-10 13:51:35 +0000
commit61ff90460d61a33a9187006fd199424b23e9fbd2 (patch)
tree7fca648bd26f8665722a5c59f9c1f424c5b5275c /tests
parent72d352f64ec97c2b15173cc1a191c0e80bde9630 (diff)
downloadsphinx-git-61ff90460d61a33a9187006fd199424b23e9fbd2.tar.gz
use 'callable' to check if object is callable (B004)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_build_html.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index 3a468df4a..2568bb5b8 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -99,7 +99,7 @@ def check_xpath(etree, fname, path, check, be_found=True):
else:
assert nodes != [], ('did not find any node matching xpath '
'%r in file %s' % (path, fname))
- if hasattr(check, '__call__'):
+ if callable(check):
check(nodes)
elif not check:
# only check for node presence