diff options
Diffstat (limited to 'clang/bindings/python/tests/cindex/test_cdb.py')
-rw-r--r-- | clang/bindings/python/tests/cindex/test_cdb.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/bindings/python/tests/cindex/test_cdb.py b/clang/bindings/python/tests/cindex/test_cdb.py index 5908239c46c..589fc72856b 100644 --- a/clang/bindings/python/tests/cindex/test_cdb.py +++ b/clang/bindings/python/tests/cindex/test_cdb.py @@ -11,6 +11,8 @@ import os import gc import unittest import sys +from .util import skip_if_no_fspath +from .util import str_to_path kInputsDir = os.path.join(os.path.dirname(__file__), 'INPUTS') @@ -37,6 +39,13 @@ class TestCDB(unittest.TestCase): cmds = cdb.getCompileCommands('/home/john.doe/MyProject/project.cpp') self.assertNotEqual(len(cmds), 0) + @skip_if_no_fspath + def test_lookup_succeed_pathlike(self): + """Same as test_lookup_succeed, but with PathLikes""" + cdb = CompilationDatabase.fromDirectory(str_to_path(kInputsDir)) + cmds = cdb.getCompileCommands(str_to_path('/home/john.doe/MyProject/project.cpp')) + self.assertNotEqual(len(cmds), 0) + def test_all_compilecommand(self): """Check we get all results from the db""" cdb = CompilationDatabase.fromDirectory(kInputsDir) |