cover tsstats.log.parse_logs

This commit is contained in:
Thor77 2016-05-24 22:38:52 +02:00
parent da5683ede2
commit 09ad45e9a6
3 changed files with 8 additions and 3 deletions

View File

@ -56,7 +56,7 @@ author = 'Thor77'
# The short X.Y version. # The short X.Y version.
version = '0.5' version = '0.5'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.5.0' release = '0.5.1'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup( setup(
name='tsstats', name='tsstats',
version='0.5.0', version='0.5.1',
author='Thor77', author='Thor77',
author_email='thor77@thor77.org', author_email='thor77@thor77.org',
description='A simple Teamspeak stats-generator', description='A simple Teamspeak stats-generator',

View File

@ -1,7 +1,7 @@
import pytest import pytest
from tsstats.exceptions import InvalidLog from tsstats.exceptions import InvalidLog
from tsstats.log import parse_log from tsstats.log import parse_log, parse_logs
@pytest.fixture @pytest.fixture
@ -37,3 +37,8 @@ def test_log_pbans(clients):
def test_log_invalid(): def test_log_invalid():
with pytest.raises(InvalidLog): with pytest.raises(InvalidLog):
parse_log('tsstats/tests/res/test.log.broken') parse_log('tsstats/tests/res/test.log.broken')
def test_log_multiple():
assert len(parse_log('tsstats/tests/res/test.log')) == \
len(parse_logs('tsstats/tests/res/test.log'))