On Tuesday, April 16, 2019 at 8:16:29 AM UTC-7, Daniel Krenn wrote:
>
> On 16.04.19 16:56, John H Palmieri wrote: 
> > Is the printed order important? If not, you can change the doctest to 
> > something else that is actually testing something relevant [...] 
>
> Changing the doctest really an option here, as we want to see the 
> transistions of the automaton which are display like this: 
>
>             [Transition from frozenset({frozenset({'B', 'C'}), 
>                                         frozenset({'A', 'C'}), 
>                                         frozenset({'A', 'B', 'C'})}) 
>                         to frozenset({frozenset({'C'}), 
>                                       frozenset({'B', 'C'}), 
>                                       frozenset({'A', 'C'}), 
>                                       frozenset({'A', 'B', 'C'})}): 
>                         0|-, 
>              Transition from frozenset({frozenset({'B', 'C'}), 
>                                         frozenset({'A', 'C'}), 
>                                         frozenset({'A', 'B', 'C'})}) 
>                         to frozenset({frozenset({'B', 'C'}), 
>                                       frozenset({'A', 'C'}), 
>                                       frozenset({'A', 'B', 'C'})}): 
>                         1|-] 
>

Do you want to test that you get *that* string representation back?
Or do you want to check that you are getting string representations of that 
shape, but with possibly differently order frozensets?
Or do you want to check that you get a list back with transitions that have 
certain properties?

Unless this is about the `repr` method, I expect that you don't actually 
care about the string reps. Can you just explicitly construct the list of 
transitions that you want to compare with and then use comparison on 
actual, meaningful objects? Or perhaps you can just test the transitions in 
the list to have the desired properties? I guess they're maps, so you could 
test some of the images of known inputs.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to