Skip to content
Snippets Groups Projects
Unverified Commit dbb909db authored by Justin Ehlert's avatar Justin Ehlert Committed by GitHub
Browse files

Merge pull request #1102 from scitran/tsv-filetype

Identify files with tsv extension as tabular data
parents 917c7bf3 248488ce
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"presentation": [ ".ppt", ".pptx" ], "presentation": [ ".ppt", ".pptx" ],
"source code": [ ".c", ".py", ".cpp", ".js", ".m", ".json", ".java", ".php", ".css", ".toml", ".yaml", ".yml" ], "source code": [ ".c", ".py", ".cpp", ".js", ".m", ".json", ".java", ".php", ".css", ".toml", ".yaml", ".yml" ],
"spreadsheet": [ ".xls", ".xlsx" ], "spreadsheet": [ ".xls", ".xlsx" ],
"tabular data": [ ".csv.gz", ".csv" ], "tabular data": [ ".csv.gz", ".csv", ".tsv.gz", ".tsv" ],
"text": [ ".txt" ], "text": [ ".txt" ],
"video": [ ".mpeg", ".mpg", ".mov", ".mp4", ".m4v", ".mts" ] "video": [ ".mpeg", ".mpg", ".mov", ".mp4", ".m4v", ".mts" ]
} }
...@@ -21,5 +21,11 @@ def test_qa(): ...@@ -21,5 +21,11 @@ def test_qa():
assert files.guess_type_from_filename('example.qa') == None assert files.guess_type_from_filename('example.qa') == None
assert files.guess_type_from_filename('example.qa.png.unknown') == None assert files.guess_type_from_filename('example.qa.png.unknown') == None
def test_tabular_data():
assert files.guess_type_from_filename('example.csv') == 'tabular data'
assert files.guess_type_from_filename('example.csv.gz') == 'tabular data'
assert files.guess_type_from_filename('example.tsv') == 'tabular data'
assert files.guess_type_from_filename('example.tsv.gz') == 'tabular data'
def test_unknown(): def test_unknown():
assert files.guess_type_from_filename('example.unknown') == None assert files.guess_type_from_filename('example.unknown') == None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment