def test_total_words(): f = open('tests/sample.txt', 'r') r = Ranalyzer(f.read()) f.close() assert_equal(r._total_words(), 161)