New tests pack using py.test instead of unittest

Completely rewritten, includes the same tests as in old suite.