Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/test-ci-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test CI Mac

on: [push, pull_request]

jobs:
build:
runs-on: macos-latest

strategy:
max-parallel: 4
matrix:
python-version: ["3.10", "3.11"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
brew update
brew install p7zip libarchive libmagic

- name: Set up venv
run: |
python3 -m venv venv
source venv/bin/activate
pip install -e .[system_provided,testing]

- name: Run tests
run: venv/bin/pytest -n 3 -vvs .
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ where = src
full =
typecode_libmagic >= 5.39.210223

system_provided =
typecode_libmagic_system_provided >= 32.0.0

testing =
pytest >= 6, != 7.0.0
pytest-xdist >= 2
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/archive/a.tar.gz.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: gzip compressed data, last modified
filetype_file: gzip compressed data
mimetype_file: application/gzip
mimetype_python: application/x-tar
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/archive/e.tar.bz2.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: bzip2 compressed data, block size = 900k
filetype_file: bzip2 compressed data
mimetype_file: application/x-bzip2
mimetype_python: application/x-tar
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/archive/e.tar.gz.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: gzip compressed data, last modified
filetype_file: gzip compressed data
mimetype_file: application/gzip
mimetype_python: application/x-tar
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/archive/file_4.26-1.diff.gz.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: gzip compressed data, last modified
filetype_file: gzip compressed data
mimetype_file: application/gzip
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/archive/test.tar.lzma.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: LZMA compressed data, streamed
filetype_file: LZMA compressed data
mimetype_file: application/x-lzma
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/archive/test.zip.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Zip archive data, at least v1.0 to extract
filetype_file: Zip archive data
mimetype_file: application/zip
mimetype_python: application/zip
is_file: yes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Java serialization data, version 5
filetype_file: Java serialization data
mimetype_file: application/octet-stream
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/binary/windows.dll.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: PE32+ executable (DLL) x86-64, for MS Windows
filetype_file: PE32+
mimetype_file: application/x-dosexec
mimetype_python: application/x-msdownload
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/Makefile.inc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: makefile script, ASCII text, with CRLF line terminators
filetype_file: makefile script
mimetype_file: text/x-makefile
filetype_pygment: PHP
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/ar-ER.css.map.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: JSON data
filetype_file: JSON text data
mimetype_file: application/json
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/ar-ER.js.map.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: JSON data
filetype_file: JSON text data
mimetype_file: application/json
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/binary.js.map.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Zip archive data, at least v1.0 to extract
filetype_file: Zip archive data
mimetype_file: application/zip
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/build.xml.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: exported SGML document, ASCII text, with CRLF line terminators
filetype_file: exported SGML document
mimetype_file: text/plain
mimetype_python: application/xml
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/m/Makefile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: makefile script, ASCII text, with CRLF line terminators
filetype_file: makefile script
mimetype_file: text/x-makefile
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/pom.pom.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: XML 1.0 document, ASCII text
filetype_file: XML 1.0 document
mimetype_file: text/xml
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/build/pom.xml.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: exported SGML document, ASCII text
filetype_file: exported SGML document
mimetype_file: text/plain
mimetype_python: application/xml
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/assembly/bcopy.s.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text, with CRLF line terminators
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-asm
filetype_pygment: GAS
Expand Down
3 changes: 0 additions & 3 deletions tests/data/filetest/code/c/CcccDevStudioAddIn.rc2.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
filetype_file: ASCII text
mimetype_file: text/plain
filetype_pygment: C
programming_language: C
is_file: yes
is_regular: yes
size: 397
is_text: yes
contains_text: yes
is_source: yes
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/SIMPLE.C.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C++
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/TEST.H.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C++
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/TEST_LOWERCASE.h.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/cpu.c.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/main.c.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/mm.c.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/pci.c.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/pci_v3.c.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/c/resource.h.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: ASCII text, with CRLF line terminators
filetype_file: ASCII text
mimetype_file: text/plain
mimetype_python: text/x-c
filetype_pygment: C
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/cpp/StdAfx.cpp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C++
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/cpp/stacktrace.cpp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C source, ASCII text
filetype_file: C source
mimetype_file: text/x-c
mimetype_python: text/x-c
filetype_pygment: C++
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/cpp/string.CPP.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: C++ source, ASCII text
filetype_file: C++ source
mimetype_file: text/x-c++
mimetype_python: text/x-c
filetype_pygment: C++
Expand Down
5 changes: 1 addition & 4 deletions tests/data/filetest/code/groff/example.ms.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
filetype_file: troff or preprocessor input, ASCII text
filetype_file: troff or preprocessor input
mimetype_file: text/troff
mimetype_python: text/troff
filetype_pygment:
programming_language:
is_file: yes
is_regular: yes
size: 93
is_text: yes
contains_text: yes
is_source: yes
2 changes: 1 addition & 1 deletion tests/data/filetest/code/java/Appender.java.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Java source, ASCII text
filetype_file: Java source
mimetype_file: text/x-java
mimetype_python: text/x-java-source
filetype_pygment: Java
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
filetype_file: Java source, ASCII text
filetype_file: Java source
mimetype_file: text/x-java
mimetype_python: text/vnd.sun.j2me.app-descriptor
filetype_pygment:
programming_language:
is_file: yes
is_regular: yes
size: 1447
Expand Down
3 changes: 2 additions & 1 deletion tests/data/filetest/code/java/Logger.JAVA.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Java source, ASCII text
filetype_file: Java source
mimetype_file: text/x-java
mimetype_python: text/x-java-source
filetype_pygment: Java
Expand All @@ -8,4 +8,5 @@ is_regular: yes
size: 6800
is_text: yes
contains_text: yes
is_java_source: yes
is_source: yes
2 changes: 1 addition & 1 deletion tests/data/filetest/code/java/contenttype.java.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Java source, ASCII text
filetype_file: Java source
mimetype_file: text/x-java
mimetype_python: text/x-java-source
filetype_pygment: Java
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/js/a.js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: ASCII text, with CRLF line terminators
filetype_file: ASCII text
mimetype_file: text/plain
mimetype_python: application/javascript
filetype_pygment: JavaScript
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/python/__init__.py.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Python script, ASCII text executable
filetype_file: Python script
mimetype_file: text/x-script.python
mimetype_python: text/x-python
filetype_pygment: Python
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/python/contenttype.py.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Python script, ASCII text executable
filetype_file: Python script
mimetype_file: text/x-script.python
mimetype_python: text/x-python
filetype_pygment: Python
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/code/scala/Applicative.scala.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: UTF-8 Unicode text
filetype_file: UTF-8
mimetype_file: text/plain
filetype_pygment: Scala
programming_language: Scala
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/compiled/flash/a.swf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Macromedia Flash data, version 7
filetype_file: Macromedia Flash data
mimetype_file: application/x-shockwave-flash
mimetype_python: application/x-shockwave-flash
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/compiled/flash/b.swf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: Macromedia Flash data, version 7
filetype_file: Macromedia Flash data
mimetype_file: application/x-shockwave-flash
mimetype_python: application/x-shockwave-flash
is_file: yes
Expand Down
3 changes: 1 addition & 2 deletions tests/data/filetest/compiled/linux/i686-shash.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
filetype_file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked,
interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.4, with debug_info, not stripped
filetype_file: ELF 32-bit LSB executable
mimetype_file: application/x-executable
elf_type: executable
is_file: yes
Expand Down
3 changes: 1 addition & 2 deletions tests/data/filetest/compiled/linux/x86_64-shash.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
filetype_file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter
/lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, not stripped
filetype_file: ELF 64-bit LSB executable
mimetype_file: application/x-executable
elf_type: executable
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/compiled/win/file.exe.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
filetype_file: PE32
mimetype_file: application/x-dosexec
mimetype_python: application/x-msdownload
is_file: yes
Expand Down
3 changes: 1 addition & 2 deletions tests/data/filetest/compiled/win/zlib1.dll.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
filetype_file: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS
Windows
filetype_file: PE32
mimetype_file: application/x-dosexec
mimetype_python: application/x-msdownload
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/config/config.conf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: ASCII text, with CRLF line terminators
filetype_file: ASCII text
mimetype_file: text/plain
mimetype_python: text/plain
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/config/wrapper.conf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: ASCII text, with CRLF line terminators
filetype_file: ASCII text
mimetype_file: text/plain
mimetype_python: text/plain
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/data/mysql-arch.ARZ.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: gzip compressed data, from Unix, original size modulo 2^32 305
filetype_file: gzip compressed data
mimetype_file: application/gzip
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/data/mysql-arch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: MySQL table definition file Version 224, type DIAM_ISAM, MySQL version -1515870811
filetype_file: MySQL table definition file Version -32
mimetype_file: application/octet-stream
is_file: yes
is_regular: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/data/nulls.txt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: ASCII text, with very long lines, with no line terminators
filetype_file: ASCII text
mimetype_file: text/plain
mimetype_python: text/plain
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/debug/QTMovieWin.pdb.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: MSVC program database ver 7.00, 1024*843 bytes
filetype_file: MSVC program database ver 7.00
mimetype_file: application/x-ms-pdb
mimetype_python: application/vnd.palm
is_file: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/doc/html/Label.html.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: HTML document, ASCII text, with very long lines
filetype_file: HTML document
mimetype_file: text/html
mimetype_python: text/html
filetype_pygment: HTML
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/doc/html/a.htm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: HTML document, ASCII text, with CRLF line terminators
filetype_file: HTML document
mimetype_file: text/html
mimetype_python: text/html
filetype_pygment: HTML
Expand Down
2 changes: 1 addition & 1 deletion tests/data/filetest/doc/html/allclasses-frame.html.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filetype_file: HTML document, ASCII text
filetype_file: HTML document
mimetype_file: text/html
mimetype_python: text/html
filetype_pygment: HTML
Expand Down
Loading