add python test for add_torrent_params and run the tests less verbose on travis and appveyor
This commit is contained in:
parent
b3dbce5790
commit
3d0e5fdec9
|
@ -248,9 +248,9 @@ script:
|
||||||
- 'if [[ "$python" == "1" ]]; then
|
- '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 &&
|
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
|
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
||||||
DYLD_LIBRARY_PATH=./dependencies python2 test.py;
|
DYLD_LIBRARY_PATH=./dependencies python2 test.py -b;
|
||||||
else
|
else
|
||||||
LD_LIBRARY_PATH=./dependencies python test.py;
|
LD_LIBRARY_PATH=./dependencies python test.py -b;
|
||||||
fi;
|
fi;
|
||||||
fi'
|
fi'
|
||||||
- cd ../..;
|
- cd ../..;
|
||||||
|
|
|
@ -109,7 +109,7 @@ test_script:
|
||||||
# we use 64 bit python build
|
# we use 64 bit python build
|
||||||
- if defined python (
|
- if defined python (
|
||||||
copy dependencies\*.* .
|
copy dependencies\*.* .
|
||||||
& c:\Python35-x64\python.exe test.py
|
& c:\Python35-x64\python.exe test.py -b
|
||||||
)
|
)
|
||||||
|
|
||||||
# simulation tests
|
# simulation tests
|
||||||
|
|
|
@ -45,6 +45,13 @@ class test_create_torrent(unittest.TestCase):
|
||||||
|
|
||||||
class test_session_stats(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):
|
def test_unique(self):
|
||||||
metrics = lt.session_stats_metrics()
|
metrics = lt.session_stats_metrics()
|
||||||
self.assertTrue(len(metrics) > 40)
|
self.assertTrue(len(metrics) > 40)
|
||||||
|
|
Loading…
Reference in New Issue