From df962f8e7bab9d8cd1dc9143f44977b0711c5bd9 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 7 Jun 2015 16:11:32 +1200 Subject: Convert parse_pathod to generator --- test/test_language_actions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_language_actions.py') diff --git a/test/test_language_actions.py b/test/test_language_actions.py index 3ead141a..9f36805f 100644 --- a/test/test_language_actions.py +++ b/test/test_language_actions.py @@ -15,9 +15,9 @@ def test_unique_name(): class TestDisconnects: def test_parse_pathod(self): - a = language.parse_pathod("400:d0").actions[0] + a = language.parse_pathod("400:d0").next().actions[0] assert a.spec() == "d0" - a = language.parse_pathod("400:dr").actions[0] + a = language.parse_pathod("400:dr").next().actions[0] assert a.spec() == "dr" def test_at(self): @@ -40,12 +40,12 @@ class TestDisconnects: class TestInject: def test_parse_pathod(self): - a = language.parse_pathod("400:ir,@100").actions[0] + a = language.parse_pathod("400:ir,@100").next().actions[0] assert a.offset == "r" assert a.value.datatype == "bytes" assert a.value.usize == 100 - a = language.parse_pathod("400:ia,@100").actions[0] + a = language.parse_pathod("400:ia,@100").next().actions[0] assert a.offset == "a" def test_at(self): @@ -60,7 +60,7 @@ class TestInject: def test_serve(self): s = cStringIO.StringIO() - r = language.parse_pathod("400:i0,'foo'") + r = language.parse_pathod("400:i0,'foo'").next() assert language.serve(r, s, {}) def test_spec(self): @@ -93,7 +93,7 @@ class TestPauses: assert v.offset == "a" def test_request(self): - r = language.parse_pathod('400:p10,10') + r = language.parse_pathod('400:p10,10').next() assert r.actions[0].spec() == "p10,10" def test_spec(self): -- cgit v1.2.3