From 3112311f7ea9a2982abe88c235f0fe18a29dda0a Mon Sep 17 00:00:00 2001 From: Thor77 Date: Thu, 19 May 2016 21:35:39 +0200 Subject: [PATCH] move invalid-log-test from test_general.py to test_log.py --- tsstats/tests/test_general.py | 5 ----- tsstats/tests/test_log.py | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tsstats/tests/test_general.py b/tsstats/tests/test_general.py index 89c6efb..671d2fa 100644 --- a/tsstats/tests/test_general.py +++ b/tsstats/tests/test_general.py @@ -40,8 +40,3 @@ def test_debug_log(): logger.setLevel(logging.INFO) open('debug.txt') remove('debug.txt') - - -def test_parse_broken(): - with pytest.raises(exceptions.InvalidLog): - parse_logs('tsstats/tests/res/test.log.broken') diff --git a/tsstats/tests/test_log.py b/tsstats/tests/test_log.py index 51bb6a4..18e5f04 100644 --- a/tsstats/tests/test_log.py +++ b/tsstats/tests/test_log.py @@ -1,4 +1,6 @@ import pytest + +from tsstats.exceptions import InvalidLog from tsstats.log import parse_logs @@ -30,3 +32,8 @@ def test_log_bans(clients): def test_log_pbans(clients): assert clients['2'].pbans == 1 + + +def test_log_invalid(): + with pytest.raises(InvalidLog): + parse_logs('tsstats/tests/res/test.log.broken')