From c940933e2183e3d23b57212d187dabf201b4cf4f Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 9 Mar 2018 11:20:23 +0200 Subject: Add mevaker test and cleanup sample discovery --- tests/test_parse.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/test_parse.py') diff --git a/tests/test_parse.py b/tests/test_parse.py index 42b03bc..bc213eb 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -1,5 +1,7 @@ import pytest +from os import walk +from os.path import join from viewstate import * @@ -45,8 +47,9 @@ class TestParse(object): assert vs.decode() def test_parse_samples(self): - for s in ['ngcs', 'mot', 'ecom']: - with open('tests/samples/{}.sample'.format(s), 'r') as f: - vs = ViewState(f.read()) - _ = vs.decode() + for root, dirs, files in walk('tests/samples'): + for f in files: + with open(join(root, f), 'r') as t: + vs = ViewState(t.read()) + _ = vs.decode() -- cgit v1.3.1