Commits

alec  committed e0e65c0 Draft

Finish lesson 3, on None.

  • Participants
  • Parent commits adae535

Comments (0)

Files changed (1)

File python2/koans/about_none.py

 
     def test_none_is_an_object(self):
         "Unlike NULL in a lot of languages"
-        self.assertEqual(__, isinstance(None, object))
+        self.assertEqual(True, isinstance(None, object))
 
     def test_none_is_universal(self):
         "There is only one None"
-        self.assertEqual(__, None is None)
+        self.assertEqual(True, None is None)
 
     def test_what_exception_do_you_get_when_calling_nonexistent_methods(self):
         """
             # Need a recap on how to evaluate __class__ attributes?
             #   https://github.com/gregmalcolm/python_koans/wiki/Class-Attribute
 
-            self.assertEqual(__, ex.__class__)
+            self.assertEqual(AttributeError, ex.__class__)
 
             # What message was attached to the exception?
             # (HINT: replace __ with part of the error message.)
-            self.assertMatch(__, ex.args[0])
+            self.assertMatch("'NoneType'" , ex.args[0])
 
     def test_none_is_distinct(self):
         """
         None is distinct from other things which are False.
         """
-        self.assertEqual(____, None is not 0)
-        self.assertEqual(____, None is not False)
+        self.assertEqual(True, None is not 0)
+        self.assertEqual(True, None is not False)