Consider removing the commented out code block
25# schema = schema_list[0]
26# self.assertEqual(schema, defaultAggregation)
27
28# def test_loadStorageSchemas_raise_CarbonConfigException(self):29# from carbon.storage import loadStorageSchemas
30# from carbon.exceptions import CarbonConfigException
31# with self.assertRaises(CarbonConfigException):
Consider removing the commented out code block
18# def tearDown(self):
19# self._settings_patch.stop()
20
21# def test_loadAggregationSchemas_load_default_schema(self):22# from carbon.storage import loadAggregationSchemas, defaultAggregation
23# schema_list = loadAggregationSchemas()
24# self.assertEqual(len(schema_list), 1)
Consider removing the commented out code block
15# self._settings_patch = patch.dict('carbon.conf.settings', settings)
16# self._settings_patch.start()
17
18# def tearDown(self):19# self._settings_patch.stop()
20
21# def test_loadAggregationSchemas_load_default_schema(self):
Consider removing the commented out code block
8
9# class NoConfigSchemaLoadingTest(TestCase):
10
11# def setUp(self):12# settings = {
13# 'CONF_DIR': '',
14# }
Consider removing the commented out code block
6from carbon.database import WhisperDatabase
7
8
9# class NoConfigSchemaLoadingTest(TestCase):10
11# def setUp(self):
12# settings = {
Description
It is recommended to remove any commented code in your codebase.
Bad practice
for item in sequence:
# print(item)
do_something(item)
# def old_function():
# '''Older implementation that has been replaced'''
# data = get_data()
# api.post(data)
Recommended
for item in sequence:
do_something(item)