Skip to content

Commit

Permalink
Fix test script
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Apr 17, 2023
1 parent 603531b commit 377f53a
Showing 1 changed file with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,5 @@ set -e

coverage erase

# test1.odm - book with ascii meta
# test2.odm - book with non-ascii meta
# test3.odm - Issue using mutagen, ref #17
# test4.odm - HTML entities decoding, ref #19

for test_index in '1' '2' '3' '4'
do
export TEST_ODM="test${test_index}.odm"
echo "======================= Testing with ${TEST_ODM} ======================="

# Tests for `odmpy info` command
coverage run --append -m unittest -v tests.OdmpyTests.test_info
coverage run --append -m unittest -v tests.OdmpyTests.test_info_json

# Tests for `odmpy dl` command
coverage run --append -m unittest -v tests.OdmpyDlTests

unset TEST_ODM
done
echo '======================================================================'

# Misc Tests
# test fix for #24 cover download fail
TEST_ODM="test_ref24.odm" coverage run --append -m unittest -v tests.OdmpyTests.test_cover_fail_ref24
# test for #26 opf generation
TEST_ODM="test1.odm" coverage run --append -m unittest -v tests.OdmpyTests.test_opf
# test odm return
TEST_ODM="test1.odm" coverage run --append -m unittest -v tests.OdmpyTests.test_odm_return
TEST_ODM="test1.odm" coverage run --append -m unittest -v tests.OdmpyTests.test_odm_return_fail
TEST_ODM="test1.odm" coverage run --append -m unittest -v tests.OdmpyTests.test_odm_return_error

# Tests for `odmpy libby` command
coverage run --append -m unittest -v tests.OdmpyLibbyTests

# Tests for odmpy.libby
coverage run --append -m unittest -v tests.LibbyClientTests

# Test for odmpy.overdrive
coverage run --append -m unittest -v tests.OverDriveClientTests

# Tests for odmpy.utils
coverage run --append -m unittest -v tests.UtilsTests

# Tests for odmpy.processing.shared
coverage run --append -m unittest -v tests.ProcessingSharedTests

coverage run --append -m odmpy --version
coverage run --append -m unittest -v tests

0 comments on commit 377f53a

Please sign in to comment.