fix python2.6 failure with assertRaises syntax

pass functiona and options rather than use as context
Merge branch 'compression_options' into dev