Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0da2ee2

Browse files
author
v.shepard
committed
merge master
2 parents 4f38bd5 + 3cc9d67 commit 0da2ee2

File tree

8 files changed

+29
-20
lines changed

8 files changed

+29
-20
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
testgres is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.
22

3-
Copyright (c) 2016-2018, Postgres Professional
3+
Copyright (c) 2016-2023, Postgres Professional
44

55
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
66

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# -- Project information -----------------------------------------------------
2020

2121
project = u'testgres'
22-
copyright = u'2016-2022, Postgres Professional'
22+
copyright = u'2016-2023, Postgres Professional'
2323
author = u'Postgres Professional'
2424

2525
# The short X.Y version

publish_package.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
# Copyright (c) 2017-2022 Postgres Professional
4-
53
set -eux
64

75
# prepare environment
@@ -21,3 +19,4 @@ python3 setup.py sdist bdist_wheel
2119
twine upload dist/*
2220

2321
set +eux
22+

run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright (c) 2017-2022 Postgres Professional
3+
# Copyright (c) 2017-2023 Postgres Professional
44

55
set -eux
66

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
from distutils.core import setup
77

88
# Basic dependencies
9-
install_requires = ["pg8000", "port-for>=0.4", "six>=1.9.0", "psutil", "fabric"]
9+
install_requires = [
10+
"pg8000",
11+
"port-for>=0.4",
12+
"six>=1.9.0",
13+
"psutil",
14+
"packaging",
15+
]
1016

1117
# Add compatibility enum class
1218
if sys.version_info < (3, 4):

testgres/node.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class ProcessProxy(object):
116116
process: wrapped psutill.Process object
117117
ptype: instance of ProcessType
118118
"""
119+
119120
def __init__(self, process, ptype=None):
120121
self.process = process
121122
self.ptype = ptype or ProcessType.from_process(process)
@@ -710,12 +711,12 @@ def start(self, params=[], wait=True):
710711
return self
711712

712713
_params = [
713-
get_bin_path("pg_ctl"),
714-
"-D", self.data_dir,
715-
"-l", self.pg_log_file,
716-
"-w" if wait else '-W', # --wait or --no-wait
717-
"start"
718-
] + params # yapf: disable
714+
get_bin_path("pg_ctl"),
715+
"-D", self.data_dir,
716+
"-l", self.pg_log_file,
717+
"-w" if wait else '-W', # --wait or --no-wait
718+
"start"
719+
] + params # yapf: disable
719720

720721
try:
721722
execute_utility(_params, self.utils_log_file)
@@ -765,7 +766,7 @@ def kill(self, someone=None):
765766
"""
766767
if self.is_started:
767768
sig = signal.SIGKILL if os.name != 'nt' else signal.SIGBREAK
768-
if someone == None:
769+
if someone is None:
769770
os.kill(self.pid, sig)
770771
else:
771772
os.kill(self.auxiliary_pids[someone][0], sig)
@@ -1509,10 +1510,10 @@ def querier():
15091510
return sum
15101511

15111512
def pgbench_table_checksums(self, dbname="postgres",
1512-
pgbench_tables = ('pgbench_branches',
1513-
'pgbench_tellers',
1514-
'pgbench_accounts',
1515-
'pgbench_history')
1513+
pgbench_tables=('pgbench_branches',
1514+
'pgbench_tellers',
1515+
'pgbench_accounts',
1516+
'pgbench_history')
15161517
):
15171518
return {(table, self.table_checksum(table, dbname))
15181519
for table in pgbench_tables}

testgres/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212

1313
from contextlib import contextmanager
1414
from packaging.version import Version
15-
from distutils.spawn import find_executable
15+
try:
16+
from shutil import which as find_executable
17+
except ImportError:
18+
from distutils.spawn import find_executable
1619
from six import iteritems
1720

1821
from fabric import Connection

tests/test_simple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ def test_node_exit(self):
171171
def test_double_start(self):
172172
with get_new_node().init().start() as node:
173173
# can't start node more than once
174-
with self.assertRaises(StartNodeException):
175-
node.start()
174+
node.start()
175+
self.assertTrue(node.is_started)
176176

177177
def test_uninitialized_start(self):
178178
with get_new_node() as node:

0 commit comments

Comments
 (0)