summaryrefslogtreecommitdiffstats
path: root/clang/bindings/python/tests/cindex/test_cursor_kind.py
Commit message (Collapse)AuthorAgeFilesLines
* [python] [tests] Support overriding library path via environmentMichal Gorny2018-10-111-0/+5
| | | | | | | | | | | | | | | | | Support a new CLANG_LIBRARY_PATH environment variable for the Python binding tests. This variable can be used to force the bindings to load libclang.* from a specific directory. I plan to use this when integrating Python binding tests with the CMake build system. Currently, those tests load libclang.so from default search paths, so I would have to rely on platform-specific mechanics such as LD_LIBRARY_PATH. Instead of copying the whole logic necessary to handle platform differences into yet another place, it's easier to just add a dedicated variable for this purpose. Differential Revision: https://reviews.llvm.org/D52806 llvm-svn: 344240
* [python] [tests] Rewrite to use standard unittest moduleMichal Gorny2017-11-101-47/+51
| | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the tests from using plain 'assert' mixed with some nosetests methods to the standard unittest module layout. Improve the code to use the most canonical assertion methods whenever possible. This has a few major advantages: - the code uses standard methods now, resulting in a reduced number of WTFs whenever someone with basic Python knowledge gets to read it, - completely unnecessary dependency on nosetests is removed since the standard library supplies all that is necessary for the tests to run, - the tests can be run via any test runner, including the one built-in in Python, - the failure output for most of the tests is improved from 'assertion x == y failed' to actually telling the values. Differential Revision: https://reviews.llvm.org/D39763 llvm-svn: 317897
* [libclang] Fix a failure in a test for python bindings on ↵Igor Kudrin2016-10-181-1/+2
| | | | | | | | | | CursorKind.OVERLOAD_CANDIDATE. The test fails because the value does not lay in any existing group. Differential Revision: https://reviews.llvm.org/D25470 llvm-svn: 284463
* [libclang] Visit TypeAliasTemplateDeclSergey Kalinichev2015-11-151-0/+1
| | | | | | | | This makes TypeAliasTemplateDecl accessible via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13844 llvm-svn: 253166
* [libclang/python] Add a few "cursor kinds" that were missing in the python ↵Argyrios Kyrtzidis2013-06-111-2/+9
| | | | | | | | binding for libclang. Patch by Mathieu Baudet! llvm-svn: 183760
* [clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}Tobias Grosser2012-02-051-0/+9
| | | | | | Contributed by: Gregory Szorc <gregory.szorc@gmail.com> llvm-svn: 149827
* Improve the Python bindings for libclang in a few ways, from EliDouglas Gregor2011-07-061-2/+6
| | | | | | | | | | | | | | | | | Bendersky. Specifically: * Implemented a new function in libclang: clang_isAttribute * Fixing TranslationUnit.get_includes to only go through the argument * buffer when it contains something. This fixed a crash on Windows * clang_getFileName returns CXString, not char*. Made appropriate * fixes in cindex.py - now the relevant tests pass and we can see the * full locations correctly again (previously there was garbage in * place of the file name) * Exposed clang_getCursorDisplayName to the python bindings llvm-svn: 134460
* cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.Daniel Dunbar2010-01-241-0/+27
Also, add CursorKind.get_all_kinds(). llvm-svn: 94389
OpenPOWER on IntegriCloud