alfredodeza / konira

beautiful (readable) testing in Python
60 stars 9 forks source link

Agnostic class/method name string convertion #21

Closed lweberk closed 11 years ago

lweberk commented 11 years ago
lweberk commented 11 years ago

Hmm the traceback uppon a assertion error ends up outputting a method name like it_serializes0c32xcorrectly. This commit would require some makeup on the error output perhaps.

alfredodeza commented 11 years ago

I don't think this approach is the correct one. The sorting should be done implicitly and konira should respect the order in which they were written. I will come up with a mechanism that can respect that fact.

Thank you for the time and effort put into this, unfortunately, it was done at a time where I was unavailable to provide guidance.

Feel free to add/contribute to the discussion on the ticket.

lweberk commented 11 years ago

Well that would be easily done by further prefixing something like it_lx, using the same encoding approach. This would sort them by line number and thus implicitly.

As for this patch, it actually allows you to use any char in your description names, which is another issue. It does not exclusively add support for explicit alphabetical ordering through ordinal numbering. Shure you don't want to review it before closing?

Either way, I am very sorry but we decided to fall back to bare pytest, since we went from problem to problem with Konira, since it drops too much of the test code metadata. That said we are bailing our efforts.

alfredodeza commented 11 years ago

I wasn't aware there were other problems with Konira. Using py.test would be at the top of my list as well.

Maybe I got confused for a pull request that referenced the alphabetical ordering issue but addressed the "any character" as a name (did you opened an issue on that?).

I will need to get some notes down on contributing, but generally I prefer a pull request addressing a single problem (even better if associated to a direct issue).

To recap:

If the ordering is a must, I promise to have a solution within a week following my recap from above. If you like py.test features, please note that there is a pytest-konira plugin as well.