expects
expects copied to clipboard
new feature: expect(subj, message)..
Hi, can you add message to add it to error. for instance: import expects as e from expects import expect expect(df, 'Extracted data').to(e.be(pd.DataFrame)) must generate error like following: Extracted data: expected: None to be <class 'pandas.core.frame.DataFrame'> if message is set, otherwise as is now.
It would occasionally be really nice to have something like this to control the error message that gets produced on failure. There are some workarounds in this discussion that might apply here too (from a similar request in a JS expects library that similarly doesn't allow custom error messages): https://github.com/facebook/jest/issues/3293