Skip to content

Commit

Permalink
Add black-box tests with tox
Browse files Browse the repository at this point in the history
  • Loading branch information
mdraw committed Oct 15, 2023
1 parent 224b2af commit aea1673
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Script that tests black-box tests deface with examples.
# Before running, install deface and cd to the repo root


# Show help, checking if the main script runs without errors
deface --help

# Create a temporary directory for outputs
tmpdir=$(mktemp -d -t deface-XXXXXXXXXX)

# Test deface with the example image, write output to temporary directory
deface ./examples/city.jpg -o ${tmpdir}/city_anonymized.jpg

# TODO: Add more tests (video I/O, different EPs)
19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tox]
env_list =
py310, py311, py312
minversion = 4.11.3

[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312

[testenv]
description = Run executable with example data
package = wheel
wheel_build_env = .pkg
allowlist_externals =
bash
commands =
bash ./test_examples.sh

0 comments on commit aea1673

Please sign in to comment.