def test_dir_from_spec(self):
        mock = Mock(spec=unittest.TestCase)
        testcase_attrs = set(dir(unittest.TestCase))
        attrs = set(dir(mock))

        # all attributes from the spec are included
        self.assertEqual(set(), testcase_attrs - attrs)

        # shadow a sys attribute
        mock.version = 3
        self.assertEqual(dir(mock).count('version'), 1)
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/unittest/test/testmock/testmock.py/MockTest.test_dir_from_spec/original