Skip to content

Commit

Permalink
Moved test script to pytests
Browse files Browse the repository at this point in the history
  • Loading branch information
dockmd committed Feb 5, 2025
1 parent 3fb7618 commit 1e64406
Show file tree
Hide file tree
Showing 12 changed files with 815 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@ jobs:
with:
path: corpus
ref: integration
- name: Checkout validator repository
- name: Checkout eark-validator repository
uses: actions/checkout@v4
with:
repository: E-ARK-Software/eark-validator
path: validator
ref: integration
- name: Setup Python 3.10
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Validating test cases
python-version: '3.13'
- name: Install eark-validator
run: |
python -m pip install --upgrade pip
pip install ./validator
chmod +rx ./corpus/validate-all-testcases
cd ./corpus
./validate-all-testcases
- name: Install corpus tests
run: |
pip install -r ./corpus/tests/requirements.txt
- name: Run corpus tests
run: |
pytest
96 changes: 96 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# VS Code settings dir
.vscode/

# Idea settings
.idea
92 changes: 0 additions & 92 deletions scripts/validate-testcases.py

This file was deleted.

24 changes: 24 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Idea

The tests cover all requirements defined in the corpus. This helps to keep the test cases up to date, and also to verify that the validators are validating the packages correctly.

## Prerequisites

In order to verify test cases you need to have validator installed.

Eark-validator - https://github.com/E-ARK-Software/eark-validator

## Setting up
Install packages:

```shell
pip install -r requirements.txt
```

## Running

Just type in repository directory:

```shell
pytest
```
Empty file added tests/__init__.py
Empty file.
Loading

0 comments on commit 1e64406

Please sign in to comment.