From f1101704b7aeee874f8ef84f418821a64821fac6 Mon Sep 17 00:00:00 2001 From: twneale Date: Thu, 5 Sep 2013 22:34:05 -0400 Subject: [PATCH] test madness --- tests/test_rollcall.py | 5 ++--- tests/test_wnominate.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_rollcall.py b/tests/test_rollcall.py index 63fb3d2..96f3e05 100644 --- a/tests/test_rollcall.py +++ b/tests/test_rollcall.py @@ -29,10 +29,9 @@ class RollcallTest(TestCase): # origininall created. here = dirname(abspath(__file__)) with cd(join(here, 'fixtures')): - f = open('sen109kh.ord') - ordfile = OrdFile(f) + with open('sen109kh.ord') as f: + rollcall = Rollcall.from_ordfile(f) - rollcall = ordfile.as_rollcall() summary = rollcall.summary() def test_summary(self): diff --git a/tests/test_wnominate.py b/tests/test_wnominate.py index 175488c..03031cc 100644 --- a/tests/test_wnominate.py +++ b/tests/test_wnominate.py @@ -32,10 +32,9 @@ class TestNomNom(TestCase): # origininall created. here = dirname(abspath(__file__)) with cd(join(here, 'fixtures')): - f = open('sen90kh.ord') - ordfile = OrdFile(f) + with open('sen90kh.ord') as f: + rollcall = Rollcall.from_ordfile(f) - rollcall = ordfile.as_rollcall() summary = rollcall.summary() # Calculate the expected wnominate result.