Пример #1
0
    def test_no_mutable_default_args(self):
        self.assertEqual(
            1, len(list(checks.no_mutable_default_args("def get_info_from_bdm(virt_type, bdm, mapping=[])")))
        )

        self.assertEqual(0, len(list(checks.no_mutable_default_args("defined = []"))))

        self.assertEqual(0, len(list(checks.no_mutable_default_args("defined, undefined = [], {}"))))
Пример #2
0
    def test_no_mutable_default_args(self):
        self.assertEqual(1, len(list(checks.no_mutable_default_args(
            "def get_info_from_bdm(virt_type, bdm, mapping=[])"))))

        self.assertEqual(0, len(list(checks.no_mutable_default_args(
            "defined = []"))))

        self.assertEqual(0, len(list(checks.no_mutable_default_args(
            "defined, undefined = [], {}"))))