Skip to main content

No project description provided

Project description

pytest-exasol-extension Plugin

The pytest-exasol-extension plugin provides pytest fixtures for preparing a database for the extension tests. The fixtures are backend agnostic. They run for the selected backends (see the documentation for the pytest-exasol-backend plugin).

Installation

The pytest-exasol-extension plugin can be installed using pip:

pip install pytest-exasol-extension

Usage in Tests

Below is an example of a test that requires a database connection with an open test schema.

import pytest

@pytest.fixture(scope="session")
def db_schema_name() -> str:
    """Let's override a randomly generated db schema for the test, giving it a meaningful name."""
    return 'MY_TEST_SCHEMA'

def test_something(pyexasol_connection):
    ...

Next, is an example of a test that needs to store a bucket-fs connection object in the database.

def test_something_else(bucketfs_connection_factory):
    bucketfs_connection_factory('my_connection_name,' 'some_path/in_the_bucket')
    ...

Note, that by default the tests will run twice - once for each backend.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_exasol_extension-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

pytest_exasol_extension-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_exasol_extension-0.1.0.tar.gz.

File metadata

  • Download URL: pytest_exasol_extension-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.14 Linux/5.15.0-1071-azure

File hashes

Hashes for pytest_exasol_extension-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b92f268706efad28c87802c1f546f218349733a37f23f1046520c24352aaf6c4
MD5 96a56c455d6f247a4946715e44557d69
BLAKE2b-256 0b9f787d37d8b6e070761a8000005337683ff9c211c8bd1dcc3dd63ee543ff4b

See more details on using hashes here.

File details

Details for the file pytest_exasol_extension-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_exasol_extension-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0a20b9d4d7cc01dfc3a7cd6c3d99cee70ced56954a9784b9e007d455da788e8
MD5 280234c94c182bb71ebde253dfa509f8
BLAKE2b-256 9b685e2e42bdcc1fa2219741593d1a81518c2f01fcd38333fe8ffaeeb0471e85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page