diff --git a/.travis.yml b/.travis.yml index 2b649816..7d5f8d54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: - pip install flake8 script: - - flake8 --ignore=W191,F401,E501 . + - flake8 --ignore=W191,F401,E501,F403 . notifications: email: diff --git a/testgres/__init__.py b/testgres/__init__.py index 25f044b8..414e2ac5 100644 --- a/testgres/__init__.py +++ b/testgres/__init__.py @@ -1 +1 @@ -from .testgres import PostgresNode, get_new_node, clean_all, stop_all +from .testgres import * diff --git a/testgres/testgres.py b/testgres/testgres.py index af784b91..f1d34460 100644 --- a/testgres/testgres.py +++ b/testgres/testgres.py @@ -179,7 +179,7 @@ def get_bin_path(self, filename): else: return os.path.join(pg_config.get("BINDIR"), filename) - def init(self, allows_streaming=False): + def init(self, allows_streaming=False, initdb_params=[]): """ Performs initdb """ postgres_conf = os.path.join(self.data_dir, "postgresql.conf") @@ -195,7 +195,7 @@ def init(self, allows_streaming=False): initdb = self.get_bin_path("initdb") with open(os.path.join(self.logs_dir, "initdb.log"), "a") as file_out: ret = subprocess.call( - [initdb, self.data_dir, "-N"], + [initdb, self.data_dir, "-N"] + initdb_params, stdout=file_out, stderr=subprocess.STDOUT )