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 
This seems rather odd to me and I prefer to use a local variable with a meaningful name. By doing so it's pretty obvious that `bar` is supposed to be the expected `input_dir`.