Skip to content

Commit

Permalink
Merge pull request #273 from HDembinski/fix_test_describe
Browse files Browse the repository at this point in the history
fixed bug in requires_dependency
  • Loading branch information
HDembinski authored Jul 9, 2018
2 parents b429b0e + dbec343 commit 4d9a17d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iminuit/tests/test_describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ def __call__(self, *arg):
assert describe(A(), True) == ['x', 'y']


@requires_dependency('Cython', 'cyfunc')
@requires_dependency('Cython', 'pyximport', 'cyfunc')
def test_cython_embedsig():
import pyximport
pyximport.install()
from . import cyfunc
assert describe(cyfunc.f, True) == ['a', 'b']


@requires_dependency('Cython', 'cyfunc')
@requires_dependency('Cython', 'pyximport', 'cyfunc')
def test_cython_class_method():
import pyximport
pyximport.install()
Expand Down
5 changes: 5 additions & 0 deletions iminuit/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from numpy.testing import assert_allclose
import os

__all__ = [
'requires_dependency',
Expand Down Expand Up @@ -30,6 +31,10 @@ def test_using_numpy():
"""
skip_it = False
for name in names:
path = os.path.dirname(__file__)
p = os.path.join(path, name + ".pyx")
if os.path.exists(p):
continue
try:
__import__(name)
except ImportError:
Expand Down

0 comments on commit 4d9a17d

Please sign in to comment.