failed expectations are hard to read

Create issue
Issue #10 new
Kevin Turner created an issue

when using Fake.with_args, when it fails, I get a message like this:

<type 'exceptions.AssertionError'>: fake:StyleWriterPutter.index(index={'tasks': {17: <things.plugins.plans.Task@952d...}, taskNameLimit=240, datejs=arg.any_value()) was called unexpectedly with args (index={'tasks': {17: <things.plugins.plans.Task@952dcac 'Brush Teeth' id:17>, 3: <things.plugins.plans.Task@952dc8c 'Hello World' id:3>}, 'reportTitle': 'World Domination'}, taskNameLimit=240, datejs=<bound method PlansJSONEncoder.encode of <things.plugins.plans.PlansJSONEncoder object at 0x946608c>>)

which is pretty much impossible to extract any useful information from.

I'd prefer it narrowed it down by telling me which arg didn't match, added some formatting, and it'd be great if for collections if it could compare them and show the diff.

Comments (1)

  1. Kumar McMillan repo owner

    yes, agreed. I started some work on this once but I think it's commented out. I didn't have time to finish. If you have time to muster up a patch I'll be sure to get it integrated.

  2. Log in to comment