コード例 #1
0
    def test_class_not_full(self):
        test_class_not_full = ClassList(5)
        test_class_empty = ClassList(5)

        test_class_not_full.add_student('asdf')
        test_class_not_full.add_student('af')
        test_class_not_full.add_student('ffff')
        test_class_not_full.add_student('asdfdsa')

        self.assertFalse(test_class_not_full.class_is_full())
        self.assertFalse(test_class_empty.class_is_full())
コード例 #2
0
    def test_is_class_full(self):
        test_class = ClassList(4)
        test_class.add_student('asdf')
        test_class.add_student('af')
        test_class.add_student('ffff')
        test_class.add_student('asdfdsa')

        self.assertTrue(test_class.class_is_full())