assert.throws matches error messages properly