pre-commit/tests
Zander Hill 29d66f470d Add tests for _filter_by_types
Adds a test for python and bash `types` using identify per interpreter
interpretation.

The python test succeeds with a false positive. The bash test identifies
the bug, where a comparison happens between `tags >= types`.

Tags is the tag list from identify, types is the value passed in from
configuration file as `acceptable types`.

The `tags(List) >= types(FrozenSet)` does a sort comparison of the two sequences
as evidenced by this code sample (which should return True):

```
>>> types = frozenset(['a'])
>>> tags = ['bash']
>>> tags >= types
True
```

Note: In 2.7, I cannot get this to return anything other than True.
Including the empty case:
```
>>> [] > frozenset()
True
```

Which means to me that a list is always >= a frozenset in Python 2.7.

In Python 3.5, I see errors when comparing a List to a FrozenSet. So
thankfully the interpreter is stricter in this case.

```
>>> [] >= frozenset()
TypeError: unorderable types: list() >= frozenset()
```
2018-05-03 11:46:07 +01:00
..
commands Add tests for _filter_by_types 2018-05-03 11:46:07 +01:00
languages Rename option to and improve output 2018-03-08 09:42:32 +01:00
meta_hooks Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
__init__.py Initial commit. 2014-03-12 20:25:19 -07:00
clientlib_test.py Migrate sha -> rev 2018-02-24 20:19:39 -08:00
color_test.py Upgrade add-trailing-comma to 0.4.0 2017-07-15 12:32:36 -07:00
conftest.py Restore git 1.8 support 2018-03-12 14:36:07 -07:00
envcontext_test.py Add envcontext helper 2016-03-25 11:21:50 -07:00
error_handler_test.py Replace deprecated yield_fixture with fixture 2018-01-21 15:31:17 -08:00
git_test.py Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
logging_handler_test.py Reorganize output writing 2016-11-26 12:15:55 -08:00
main_test.py Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
make_archives_test.py Restore git 1.8 support 2018-03-12 14:36:07 -07:00
output_test.py Reorganize output writing 2016-11-26 12:15:55 -08:00
parse_shebang_test.py Replace our implementation of shebang parsing with identify's 2017-07-02 18:51:26 -07:00
prefix_test.py Simplify prefix a bit 2018-01-13 16:08:18 -08:00
repository_test.py Migrate sha -> rev 2018-02-24 20:19:39 -08:00
runner_test.py Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
staged_files_only_test.py Restore git 1.8 support 2018-03-12 14:36:07 -07:00
store_test.py Migrate sha -> rev 2018-02-24 20:19:39 -08:00
util_test.py Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
xargs_test.py xargs returns nonzero for negate + not found exe (fixes pcre + not found #447) 2016-12-04 15:07:35 -08:00