Convert test abbreviation expansion to py.test

Using a parametrized test for 6 out of 7 tests of `test_main.TestAbbreviationExpansion` and a regular `py.test` exception test for `test_abbreviation_expansion_prefix_not_0_in_braces`.

Although the re-implementation seems to be bloated, I think it is easier to read since one needs to understand the actual test just once unlike the original `unittest.TestCase` with 6 independent tests.

Please let me know your thoughts! Cheers