def test_dual_transformer_regression_test(self): """DualTransformer has failed when there were multiple DualTransformers. It has also failed when DualTransformer was not the outermost transformer or when other transformers were between multiple DualTransformers.""" player = InterspersedDualTransformersNamePrefixAbsent() self.assert_orignal_equals_pickled(player) player = InterspersedDualTransformersNamePrefixPresent() self.assert_orignal_equals_pickled(player) player_class = axl.WinStayLoseShift player_class = st.DualTransformer()(player_class) player_class = st.InitialTransformer((C, D))(player_class) player_class = st.DualTransformer()(player_class) player_class = st.TrackHistoryTransformer()(player_class) interspersed_dual_transformers = player_class() self.assert_orignal_equals_pickled(interspersed_dual_transformers)
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)
Initial, JossAnn, 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(), ]