Commit tests (untested)
This commit is contained in:
parent
eafca2e9aa
commit
0d1310f287
@ -28,6 +28,29 @@ def test_pureClassParsing(fix_pureClass):
|
||||
|
||||
assert parser.isPureClass(className)
|
||||
|
||||
def test_classParsingWithPreview():
|
||||
parser = solo_turnier.competition_class.CompetitionClassParser()
|
||||
ret = parser.parseClass('Sichtung', True)
|
||||
|
||||
assert isinstance(ret, solo_turnier.competition_class.CompetitionClass)
|
||||
assert str(ret) == 'Sichtung'
|
||||
|
||||
assert parser.isPureClass('Sichtung', True)
|
||||
|
||||
def test_classParsingInvalidPreview():
|
||||
parser = solo_turnier.competition_class.CompetitionClassParser()
|
||||
try:
|
||||
parser.parseClass('Sichtung')
|
||||
assert False
|
||||
except:
|
||||
assert True
|
||||
|
||||
try:
|
||||
parser.isPureClass('Sichtung')
|
||||
assert False
|
||||
except:
|
||||
assert True
|
||||
|
||||
@pytest.fixture(params=range(4))
|
||||
def fix_combinedClass(request):
|
||||
cases = (
|
||||
|
@ -4,7 +4,7 @@ import json
|
||||
|
||||
def test_import():
|
||||
fileName = os.path.join(os.path.dirname(__file__), 'reader', 'test.csv')
|
||||
reader = solo_turnier.reader.AllResultReader(fileName)
|
||||
reader = solo_turnier.reader.CSVResultReader(fileName)
|
||||
ret = reader.readFile()
|
||||
|
||||
with open(os.path.join(os.path.dirname(__file__), 'reader', 'expected.json')) as fp:
|
||||
|
Loading…
Reference in New Issue
Block a user