-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
run_tests.sh
51 lines (38 loc) · 1.74 KB
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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