("c",),
]
)
output = list(everygrams(self.test_data))
// Test for expected output.
self.assertEqual(set(output), expected_output)
// Test that no grams are repeated.
self.assertEqual(len(output), len(expected_output))
After Change
("b", "c"),
("c",),
]
output = everygrams(iter(self.test_data))
self.assertCountEqual(output, expected_output)
// Test everygrams with a max length of 2.
expected_output = [("a",), ("a", "b"), ("b",), ("b", "c"),("c",),]