Skip to content

Commit

Permalink
Merge pull request #3 from Hiroshiba/import-importlib.util
Browse files Browse the repository at this point in the history
Import importlib.util
  • Loading branch information
matsui528 authored Jul 24, 2019
2 parents 91ec00e + d579fe8 commit 75707bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nanopq/convert_faiss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Try to import faiss
import importlib
import importlib.util
spec = importlib.util.find_spec("faiss")
if spec is None:
pass # If faiss hasn't been installed. Just skip
Expand Down
2 changes: 1 addition & 1 deletion tests/test_convert_faiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
import numpy as np

import importlib
import importlib.util
spec = importlib.util.find_spec("faiss")
if spec is None:
raise unittest.SkipTest("Cannot find the faiss module. Skipt the test for convert_faiss")
Expand Down

0 comments on commit 75707bd

Please sign in to comment.