tokuhirom / Test-Pretty

Other
20 stars 17 forks source link

Broken by Test::Builder alphas #25

Open exodist opened 9 years ago

exodist commented 9 years ago

https://github.com/Test-More/test-more/issues/505

This module will break with the new Test::Builder alphas that are already in blead.

The module overrides Test::Builder methods in ways that do not preserve their API, this cannot feasibly be supported. It also directly accesses singleton hash elements that have had proper API's for a long time (test counts).

It is worth noting that the alphas provide api's that would make it possible to implement this module without overriding anything in other modules. If interested ping me and I can provide the basic code for changing the output from Test::*, but I cannot implement the entire module over again for you.

tokuhirom commented 9 years ago

Test::Pretty is a workaround while Test::More 2.00 by mschwern. Because it supports customizable TAP renderer. T::Pretty's plan is ... When T::More 2.0 released, rewrite whole code with new API.

Could you provide a APIs to implement this module without monkey patching?

exodist commented 9 years ago

The alphas already have what you need for this:

https://github.com/Test-More/test-more/blob/master/t/Behavior/CustomOutput.t

I just added this test with a simple and more complex example. This is how to do all the heavy lifting inside Test::Stream, you just need to insert your code to actually do your specific output. The second example is probably closer to what you will eventually need.

tokuhirom commented 9 years ago

Cool!

tobyink commented 4 years ago

Is there a plan to ever fix Test::Pretty or is it permanently dead now?

Is Test::Pretty even needed now that yath exists?