add python test for add_torrent_params and run the tests less verbose on travis and appveyor

This commit is contained in:
arvidn 2018-08-13 17:27:35 +02:00 committed by Arvid Norberg
parent b3dbce5790
commit 3d0e5fdec9
3 changed files with 10 additions and 3 deletions

View File

@ -248,9 +248,9 @@ script:
- 'if [[ "$python" == "1" ]]; then
bjam -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant stage_module stage_dependencies libtorrent-link=shared boost-link=shared &&
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
DYLD_LIBRARY_PATH=./dependencies python2 test.py;
DYLD_LIBRARY_PATH=./dependencies python2 test.py -b;
else
LD_LIBRARY_PATH=./dependencies python test.py;
LD_LIBRARY_PATH=./dependencies python test.py -b;
fi;
fi'
- cd ../..;

View File

@ -109,7 +109,7 @@ test_script:
# we use 64 bit python build
- if defined python (
copy dependencies\*.* .
& c:\Python35-x64\python.exe test.py
& c:\Python35-x64\python.exe test.py -b
)
# simulation tests

View File

@ -45,6 +45,13 @@ class test_create_torrent(unittest.TestCase):
class test_session_stats(unittest.TestCase):
def test_add_torrent_params(self):
atp = lt.add_torrent_params()
for field_name in dir(atp):
field = getattr(atp, field_name)
print(field_name, field)
def test_unique(self):
metrics = lt.session_stats_metrics()
self.assertTrue(len(metrics) > 40)