P queue

Added more tests
Heap can now be created in either max or min
This is probably not the best formulation. If you were to forget to include the max parameter, it's possible you wouldn't get the default-to-1 behavior you'd expect. Instead the first element in "data" would be assigned to "max." This would cause you to miss a data element and, if the first element was 0, change your heap to a min heap unintentionally.

A smaller point: you're also overriding the builtin max identifier, and thus losing its functionality. You're only doing that in the __init__ method, but since you do use max() later in the code it'd be a good idea to use a different identifier.