Adding upstream version 1.4.13.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
afaf4643e1
commit
03367abfa8
25 changed files with 7987 additions and 0 deletions
26
tests/extensions_test.py
Normal file
26
tests/extensions_test.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
from identify import extensions
|
||||
|
||||
|
||||
@pytest.mark.parametrize('extension', extensions.EXTENSIONS)
|
||||
def test_extensions_have_binary_or_text(extension):
|
||||
tags = extensions.EXTENSIONS[extension]
|
||||
assert len({'text', 'binary'} & tags) == 1, tags
|
||||
|
||||
|
||||
@pytest.mark.parametrize('extension', extensions.EXTENSIONS_NEED_BINARY_CHECK)
|
||||
def test_need_binary_check_do_not_specify_text_binary(extension):
|
||||
tags = extensions.EXTENSIONS_NEED_BINARY_CHECK[extension]
|
||||
assert len({'text', 'binary'} & tags) == 0, tags
|
||||
|
||||
|
||||
def test_mutually_exclusive_check_types():
|
||||
assert not (
|
||||
set(extensions.EXTENSIONS) &
|
||||
set(extensions.EXTENSIONS_NEED_BINARY_CHECK)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue