Beispiel #1
0
 def test_split_splits_types_a_list_of_substrs(self):
     s = SuperIterable(t_itssp="abc.ous.fga.ssr")
     self.assertEqual(s.t_itssp, ["abc", "ous", "fga", "ssr"])
Beispiel #2
0
 def test_split_keeps_list_value_if_it_is_list_of_strs(self):
     s = SuperIterable(itssp=["a", "d", "s", "r"])
     self.assertEqual(s.itssp, ["a", "d", "s", "r"])
Beispiel #3
0
 def test_join_joins_a_types_into_a_types(self):
     s = SuperIterable(t_itsj=["a", "d", "s", "r"])
     self.assertEqual(s.t_itsj, 'a-d-s-r')
Beispiel #4
0
 def test_join_keeps_str_value_if_it_is_str(self):
     s = SuperIterable(itsj='asdhakjsh')
     self.assertEqual(s.itsj, 'asdhakjsh')
Beispiel #5
0
 def test_join_joins_a_list_of_str_into_a_str(self):
     s = SuperIterable(itsj=["a", "d", "s", "r"])
     self.assertEqual(s.itsj, 'a-d-s-r')
Beispiel #6
0
 def test_Join_keeps_callable_value_if_it_is_callable(self):
     s = SuperIterable(c_itsj='asdhakjsh')
     self.assertEqual(s.c_itsj, 'asdhakjsh')
Beispiel #7
0
 def test_reverse_reverses_str(self):
     s = SuperIterable(itsr="Hello Ben")
     self.assertEqual(s.itsr, "neB olleH")
Beispiel #8
0
 def test_reverse_reverses_list(self):
     s = SuperIterable(itl=["Hello Ben", 3, True, 6, False])
     self.assertEqual(s.itl, [False, 6, True, 3, "Hello Ben"])
Beispiel #9
0
 def test_replace_keeps_str_value_if_no_replacement_is_found(self):
     s = SuperIterable(itsrp="bbbccc")
     self.assertEqual(s.itsrp, "bbbccc")
Beispiel #10
0
 def test_replace_replaces_first_appearance_with_callable(self):
     s = SuperIterable(itsrpc="dd qq abc rr")
     self.assertEqual(s.itsrpc, "dd qq ABC rr")
Beispiel #11
0
 def test_replace_replaces_multiple_appearances(self):
     s = SuperIterable(itsrp="gg ss abc dd abc ee abc")
     self.assertEqual(s.itsrp, "gg ss ABC dd ABC ee ABC")