Skip to content

Commit 16b144a

Browse files
committed
Fix indentations
1 parent 3453c52 commit 16b144a

File tree

3 files changed

+20
-24
lines changed

3 files changed

+20
-24
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ notifications:
1818
on_failure: always
1919

2020
env:
21-
- PYTHON_VERSION=2 PG_VERSION=10
22-
- PYTHON_VERSION=2 PG_VERSION=9.6
23-
- PYTHON_VERSION=2 PG_VERSION=9.5
24-
- PYTHON_VERSION=2 PG_VERSION=9.4
2521
- PYTHON_VERSION=3 PG_VERSION=10
2622
- PYTHON_VERSION=3 PG_VERSION=9.6
2723
- PYTHON_VERSION=3 PG_VERSION=9.5

testgres/testgres.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -954,14 +954,14 @@ def restore(self, dbname, filename, username=None):
954954
self.psql(dbname=dbname, filename=filename, username=username)
955955

956956
async def poll_query_until(self,
957-
dbname,
958-
query,
959-
username=None,
960-
max_attempts=0,
961-
sleep_time=1,
962-
expected=True,
963-
raise_programming_error=True,
964-
raise_internal_error=True):
957+
dbname,
958+
query,
959+
username=None,
960+
max_attempts=0,
961+
sleep_time=1,
962+
expected=True,
963+
raise_programming_error=True,
964+
raise_internal_error=True):
965965
"""
966966
Run a query once a second until it returs 'expected'.
967967
Query should return single column.
@@ -984,9 +984,9 @@ async def poll_query_until(self,
984984
attempts = 0
985985
while max_attempts == 0 or attempts < max_attempts:
986986
res = await self.fetch(dbname=dbname,
987-
query=query,
988-
username=username,
989-
commit=True)
987+
query=query,
988+
username=username,
989+
commit=True)
990990

991991
if expected is None and res is None:
992992
return # done
@@ -1108,9 +1108,9 @@ async def catchup(self, username=None):
11081108
try:
11091109
lsn = (await master.fetch('postgres', poll_lsn))[0][0]
11101110
await self.poll_query_until(dbname='postgres',
1111-
username=username,
1112-
query=wait_lsn.format(lsn),
1113-
max_attempts=0) # infinite
1111+
username=username,
1112+
query=wait_lsn.format(lsn),
1113+
max_attempts=0) # infinite
11141114
except Exception as e:
11151115
raise CatchUpException(_explain_exception(e))
11161116

tests/test_simple.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ async def test_backup_simple(self):
385385
with backup.spawn_primary('slave') as slave:
386386
slave.start()
387387
res = await slave.fetch('postgres',
388-
'select * from test order by i asc')
388+
'select * from test order by i asc')
389389
self.assertListEqual(res, [(1, ), (2, ), (3, ), (4, )])
390390

391391
async def test_dump(self):
@@ -406,7 +406,7 @@ async def test_dump(self):
406406
node2.init().start().restore('postgres', dump)
407407

408408
res = await node2.fetch('postgres',
409-
'select * from test order by val asc')
409+
'select * from test order by val asc')
410410
self.assertListEqual(res, [(1, ), (2, )])
411411

412412
# finally, remove dump
@@ -475,17 +475,17 @@ async def test_poll_query_until(self):
475475
# check 0 columns
476476
with self.assertRaises(QueryException):
477477
await node.poll_query_until('postgres',
478-
'select from pg_class limit 1')
478+
'select from pg_class limit 1')
479479
# check None
480480
with self.assertRaises(QueryException):
481481
await node.poll_query_until('postgres', 'create table abc (val int)')
482482

483483
# check timeout
484484
with self.assertRaises(TimeoutException):
485485
await node.poll_query_until(dbname='postgres',
486-
query='select 1 > 2',
487-
max_attempts=5,
488-
sleep_time=0.2)
486+
query='select 1 > 2',
487+
max_attempts=5,
488+
sleep_time=0.2)
489489

490490
async def test_replicate(self):
491491
with get_new_node('node') as node:

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