1
mirror of https://github.com/public-apis/public-apis synced 2024-11-21 10:04:15 +01:00
public-apis/scripts
2022-01-17 20:04:31 -03:00
..
tests Create tests to check_file_format 2022-01-17 16:19:39 -03:00
validate Add format and links in validate scope 2022-01-17 19:24:45 -03:00
github_pull_request.sh Create new workflow to run test of push and pull 2022-01-17 18:18:39 -03:00
README.md Create README.md to scripts directory 2022-01-17 20:04:31 -03:00
requirements.txt Create new requirements file 2022-01-11 02:42:28 -03:00

Public APIs Scripts

This directory contains all validation and testing scripts used by Public APIs.

scripts
│   github_pull_request.sh  # used to validate changes of a pull request
│   requirements.txt  # contains dependencies of validate package
│
├───tests  # contains all unit tests from the validate package
│       test_validate_format.py
│       test_validate_links.py
│
└───validate  # validate package
        format.py
        links.py

Running Tests

To run all tests it is necessary to change to the scripts directory:

$ cd scripts

then run:

$ python -m unittest discover tests/ --verbose

To run only the format tests, run:

$ python -m unittest discover tests/ --verbose --pattern "test_validate_format.py"

To run only the links tests, run:

$ python -m unittest discover tests/ --verbose --pattern "test_validate_links.py"

Note that it is necessary to have python installed.