From 3d0e5fdec9676868e8604e8ec132b68fce259a03 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 13 Aug 2018 17:27:35 +0200 Subject: [PATCH] add python test for add_torrent_params and run the tests less verbose on travis and appveyor --- .travis.yml | 4 ++-- appveyor.yml | 2 +- bindings/python/test.py | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1ee8b6db..529fab3f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 ../..; diff --git a/appveyor.yml b/appveyor.yml index 6bc63fb47..0bbe870a2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/bindings/python/test.py b/bindings/python/test.py index 2e38e3920..6e6c75e27 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -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)