[pre-commit.ci] pre-commit autoupdate (#869)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PyCQA/autoflake: v2.0.0 → v2.0.1](https://github.com/PyCQA/autoflake/compare/v2.0.0...v2.0.1) - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) - [github.com/asottile/blacken-docs: v1.12.1 → 1.13.0](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.13.0) * Update .pre-commit-config.yaml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9373ddb3f8
commit
c695763e92
@@ -15,7 +15,7 @@ a test or fixture, you may use the ``worker_id`` fixture to do so:
|
||||
|
||||
@pytest.fixture()
|
||||
def user_account(worker_id):
|
||||
""" use a different account in each xdist worker """
|
||||
"""use a different account in each xdist worker"""
|
||||
return "account_%s" % worker_id
|
||||
|
||||
When ``xdist`` is disabled (running with ``-n0`` for example), then
|
||||
@@ -80,7 +80,7 @@ wanted to create a separate database for each test run:
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def create_unique_database(testrun_uid):
|
||||
""" create a unique database for this particular test run """
|
||||
"""create a unique database for this particular test run"""
|
||||
database_url = f"psql://myapp-{testrun_uid}"
|
||||
|
||||
with Semaphore(f"/{testrun_uid}-lock", flags=O_CREAT, initial_value=1):
|
||||
@@ -90,7 +90,7 @@ wanted to create a separate database for each test run:
|
||||
|
||||
@pytest.fixture()
|
||||
def db(testrun_uid):
|
||||
""" retrieve unique database """
|
||||
"""retrieve unique database"""
|
||||
database_url = f"psql://myapp-{testrun_uid}"
|
||||
return database_get_instance(database_url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user