Skip to content

Commit d9c6187

Browse files
author
Grégory Starck
committed
flake8
1 parent 4b571a5 commit d9c6187

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/influxdb/client_test_with_server.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,24 +204,30 @@ def close(self, remove_tree=True):
204204
if remove_tree:
205205
shutil.rmtree(self.temp_dir_base)
206206

207+
############################################################################
207208

208209

209210
def _setup_influxdb_server(inst):
210211
inst.influxd_inst = InfluxDbInstance(inst.influxdb_template_conf)
211212
inst.cli = InfluxDBClient('localhost',
212213
inst.influxd_inst.broker_port,
213214
'root', '', database='db')
215+
216+
214217
def _unsetup_influxdb_server(inst):
215218
remove_tree = sys.exc_info() == (None, None, None)
216219
inst.influxd_inst.close(remove_tree=remove_tree)
217220

221+
############################################################################
222+
218223

219224
class SingleTestCaseWithServerMixin(object):
220225
''' A mixin for unittest.TestCase to start an influxdb server instance
221226
in a temporary directory **for each test function/case**
222227
'''
223228

224-
# 'influxdb_template_conf' attribute must be set on the TestCase class or instance.
229+
# 'influxdb_template_conf' attribute must be set
230+
# on the TestCase class or instance.
225231

226232
setUp = _setup_influxdb_server
227233
tearDown = _unsetup_influxdb_server
@@ -249,6 +255,8 @@ def tearDownClass(cls):
249255
def tearDown(self):
250256
self.cli.drop_database('db')
251257

258+
############################################################################
259+
252260

253261
@unittest.skipIf(not is_influxdb_bin_ok, "could not find influxd binary")
254262
class SimpleTests(SingleTestCaseWithServerMixin,
@@ -294,6 +302,7 @@ def test_query_fail(self):
294302
('500: {"results":[{"error":"database not found: db"}]}',),
295303
ctx.exception.args)
296304

305+
############################################################################
297306

298307

299308
@unittest.skipIf(not is_influxdb_bin_ok, "could not find influxd binary")
@@ -508,6 +517,8 @@ def test_create_retention_policy(self):
508517
rsp
509518
)
510519

520+
############################################################################
521+
511522

512523
@unittest.skipIf(not is_influxdb_bin_ok, "could not find influxd binary")
513524
class UdpTests(ManyTestCasesWithServerMixin,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy