Commits

Greg Malcolm committed 68786ba

Contribution from jtatum, github pull request#6: 'Changing tuple tests to be a little more contemplative'

Comments (0)

Files changed (2)

python 2/koans/about_tuples.py

         
         self.assertEqual(__, count_of_three)
 
-    def test_tuples_of_one_are_peculiar(self):
-        self.assertEqual(__, (1))
+    def test_tuples_of_one_look_peculiar(self):
+        self.assertEqual(__, (1).__class__.__name__)
+        self.assertEqual(__, (1,).__class__.__name__)
         self.assertEqual(__, ("Hello comma!", ))
-        self.assertEqual(__, (1,))
+        
+    def test_tuple_constructor_can_be_surprising(self):
         self.assertEqual(__, tuple("Surprise!"))
 
     def test_creating_empty_tuples(self):
         self.assertEqual(__, locations[0][1][2])
         
         
-        
+        

python 3/koans/about_tuples.py

         
         self.assertEqual(__, count_of_three)
 
-    def test_tuples_of_one_are_peculiar(self):
-        self.assertEqual(__, (1))
+    def test_tuples_of_one_look_peculiar(self):
+        self.assertEqual(__, (1).__class__.__name__)
+        self.assertEqual(__, (1,).__class__.__name__)
         self.assertEqual(__, ("Hello comma!", ))
-        self.assertEqual(__, (1,))
+        
+    def test_tuple_constructor_can_be_surprising(self):
         self.assertEqual(__, tuple("Surprise!"))
 
     def test_creating_empty_tuples(self):
         self.assertEqual(__, locations[0][1][2])
         
         
-        
+