Пример #1
0
    def test_created_on_the_spot_multiple_transformers(self):
        player_class = st.FlipTransformer()(axl.Cooperator)
        player_class = st.DualTransformer()(player_class)
        player = st.FinalTransformer((C, D))(player_class)()

        self.assert_orignal_equals_pickled(player)
Пример #2
0
    Mixed,
    Nice,
    Noisy,
    Retaliation,
    RetaliateUntilApology,
    TrackHistory,
    Dual,
    Identity,
]

transformer_instances = [
    st.ApologyTransformer([D], [C]),
    st.DeadlockBreakingTransformer(),
    st.DualTransformer(),
    st.FlipTransformer(),
    st.FinalTransformer((D, D)),
    st.ForgiverTransformer(0.2),
    st.GrudgeTransformer(3),
    st.InitialTransformer((C, D)),
    st.JossAnnTransformer((0.2, 0.6)),
    st.MixedTransformer(probability, strategies),
    st.NiceTransformer(),
    st.NoisyTransformer(0.2),
    st.RetaliationTransformer(3),
    st.RetaliateUntilApologyTransformer(),
    st.TrackHistoryTransformer(),
    st.IdentityTransformer(),
]


class TestPickle(unittest.TestCase):