Skip to content

Commit 5ae340c

Browse files
authored
Fix typos (#152)
Found via `codespell -L splitted`
1 parent 1cd6cd7 commit 5ae340c

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ with testgres.get_new_node() as node:
5959
# ... node stops and its files are about to be removed
6060
```
6161

62-
There are four API methods for runnig queries:
62+
There are four API methods for running queries:
6363

6464
| Command | Description |
6565
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
6666
| `node.psql(query, ...)` | Runs query via `psql` command and returns tuple `(error code, stdout, stderr)`. |
67-
| `node.safe_psql(query, ...)` | Same as `psql()` except that it returns only `stdout`. If an error occures during the execution, an exception will be thrown. |
67+
| `node.safe_psql(query, ...)` | Same as `psql()` except that it returns only `stdout`. If an error occurs during the execution, an exception will be thrown. |
6868
| `node.execute(query, ...)` | Connects to PostgreSQL using `psycopg2` or `pg8000` (depends on which one is installed in your system) and returns two-dimensional array with data. |
6969
| `node.connect(dbname, ...)` | Returns connection wrapper (`NodeConnection`) capable of running several queries within a single transaction. |
7070

Diff for: testgres/node.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ def restore(self, filename, dbname=None, username=None):
11431143
filename
11441144
] # yapf: disable
11451145

1146-
# try pg_restore if dump is binary formate, and psql if not
1146+
# try pg_restore if dump is binary format, and psql if not
11471147
try:
11481148
execute_utility(_params, self.utils_log_name)
11491149
except ExecUtilException:
@@ -1286,7 +1286,7 @@ def set_synchronous_standbys(self, standbys):
12861286
12871287
Args:
12881288
standbys: either :class:`.First` or :class:`.Any` object specifying
1289-
sychronization parameters or just a plain list of
1289+
synchronization parameters or just a plain list of
12901290
:class:`.PostgresNode`s replicas which would be equivalent
12911291
to passing ``First(1, <list>)``. For PostgreSQL 9.5 and below
12921292
it is only possible to specify a plain list of standbys as

Diff for: testgres/plugins/pg_probackup2/pg_probackup2/gdb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, cmd, env, attach=False):
3737
" to run GDB tests")
3838
raise GdbException("No gdb usage possible.")
3939

40-
# Check gdb presense
40+
# Check gdb presence
4141
try:
4242
gdb_version, _ = subprocess.Popen(
4343
['gdb', '--version'],

Diff for: tests/test_simple.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -501,15 +501,15 @@ def test_logical_replication(self):
501501
sub.disable()
502502
node1.safe_psql('insert into test values (3, 3)')
503503

504-
# enable and ensure that data successfully transfered
504+
# enable and ensure that data successfully transferred
505505
sub.enable()
506506
sub.catchup()
507507
res = node2.execute('select * from test')
508508
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3)])
509509

510510
# Add new tables. Since we added "all tables" to publication
511511
# (default behaviour of publish() method) we don't need
512-
# to explicitely perform pub.add_tables()
512+
# to explicitly perform pub.add_tables()
513513
create_table = 'create table test2 (c char)'
514514
node1.safe_psql(create_table)
515515
node2.safe_psql(create_table)
@@ -526,7 +526,7 @@ def test_logical_replication(self):
526526
pub.drop()
527527

528528
# create new publication and subscription for specific table
529-
# (ommitting copying data as it's already done)
529+
# (omitting copying data as it's already done)
530530
pub = node1.publish('newpub', tables=['test'])
531531
sub = node2.subscribe(pub, 'newsub', copy_data=False)
532532

@@ -535,7 +535,7 @@ def test_logical_replication(self):
535535
res = node2.execute('select * from test')
536536
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3), (4, 4)])
537537

538-
# explicitely add table
538+
# explicitly add table
539539
with self.assertRaises(ValueError):
540540
pub.add_tables([]) # fail
541541
pub.add_tables(['test2'])

Diff for: tests/test_simple_remote.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -480,15 +480,15 @@ def test_logical_replication(self):
480480
sub.disable()
481481
node1.safe_psql('insert into test values (3, 3)')
482482

483-
# enable and ensure that data successfully transfered
483+
# enable and ensure that data successfully transferred
484484
sub.enable()
485485
sub.catchup()
486486
res = node2.execute('select * from test')
487487
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3)])
488488

489489
# Add new tables. Since we added "all tables" to publication
490490
# (default behaviour of publish() method) we don't need
491-
# to explicitely perform pub.add_tables()
491+
# to explicitly perform pub.add_tables()
492492
create_table = 'create table test2 (c char)'
493493
node1.safe_psql(create_table)
494494
node2.safe_psql(create_table)
@@ -505,7 +505,7 @@ def test_logical_replication(self):
505505
pub.drop()
506506

507507
# create new publication and subscription for specific table
508-
# (ommitting copying data as it's already done)
508+
# (omitting copying data as it's already done)
509509
pub = node1.publish('newpub', tables=['test'])
510510
sub = node2.subscribe(pub, 'newsub', copy_data=False)
511511

@@ -514,7 +514,7 @@ def test_logical_replication(self):
514514
res = node2.execute('select * from test')
515515
self.assertListEqual(res, [(1, 1), (2, 2), (3, 3), (4, 4)])
516516

517-
# explicitely add table
517+
# explicitly add table
518518
with self.assertRaises(ValueError):
519519
pub.add_tables([]) # fail
520520
pub.add_tables(['test2'])

0 commit comments

Comments
 (0)