Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fact_helper_file
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
fact_helper_file
Commits
67b31422
Commit
67b31422
authored
Oct 25, 2022
by
Jörg Stucke
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into installation-bugfix
parents
3d7b64cc
199365e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
run_tests.yml
.github/workflows/run_tests.yml
+25
-0
test_type.py
test/unit/test_type.py
+1
-1
No files found.
.github/workflows/run_tests.yml
0 → 100644
View file @
67b31422
name
:
Run Tests
on
:
[
pull_request
]
jobs
:
tests
:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
python-version
:
[
"
3.7"
,
"
3.8"
,
"
3.9"
,
"
3.10"
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
install deps
run
:
|
python3 -m pip install -U pip
python3 -m pip install .
python3 -m pip install -r requirements-dev.txt
-
name
:
run pytest
run
:
pytest
test/unit/test_type.py
View file @
67b31422
...
...
@@ -7,7 +7,7 @@ def test_get_file_type_system_magic():
zip_file
=
Path
(
__file__
)
.
parent
.
parent
/
'data'
/
'test.zip'
file_type
=
get_file_type_from_path
(
str
(
zip_file
))
assert
file_type
[
'mime'
]
==
'application/zip'
,
'mime type not correct'
assert
file_type
[
'full'
]
.
startswith
(
'Zip archive data, at least
v2.0 to extract
'
),
'full type not correct'
assert
file_type
[
'full'
]
.
startswith
(
'Zip archive data, at least'
),
'full type not correct'
assert
file_type
==
get_file_type_from_binary
(
zip_file
.
read_bytes
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment