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.