The function tests if a given location is inside the represented range, but it may give wrong result when the given location is on the same line with the current one-line range.
For example,
tu = ... extent = tu.get_extent('test.c', ((1, 1), (1, 14))) location = tu.get_location('test.c', (1, 20)) print location print extent print location in extent
It gives:
<SourceLocation file 'test.c', line 1, column 20>
<SourceRange start <SourceLocation file 'test.c', line 1, column 1>, end <SourceLocation file 'test.c', line 1, column 14>>
True # should be a False #