Skip to main content

No project description provided

Project description

pytest-exasol-slc Plugin

The pytest-exasol-slc plugin provides pytest fixtures for building and uploading a script language container into the database. The fixtures are backend agnostic. They run for the selected backends (see the documentation for the pytest-exasol-backend plugin).

Installation

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

pip install pytest-exasol-slc

Usage in Tests

Below is an example of a test that requires a script language container to be built and deployed in the database. The example test case overrides two fixtures used internally by the fixture deployed_slc in this plugin:

  • Fixture language_alias provides a meaningful name for the language alias.
  • Fixture slc_builder prepares the structure of the SLC used in the example test case.

The language container will be activated with the value returned by the fixture language_alias. Note, that by default the test will run twice - once for each backend.

import pytest

@pytest.fixture(scope='session')
def language_alias():
    return "MY_LANGUAGE_ALIAS"

@pytest.fixture(scope='session')
def slc_builder(use_onprem, use_saas):
    if use_onprem or use_saas:
        with language_container_factory() as container_builder:
            yield container_builder
    else:
        yield None

def test_something_with_slc(deployed_slc):
    ...

Alternatively, the language container can be deployed using the function version of this fixture. The function can be called multiple times providing an opportunity to activate the language container with different aliases.

import pytest

@pytest.fixture(scope='session')
def slc_builder(use_onprem, use_saas):
    if use_onprem or use_saas:
        with language_container_factory() as container_builder:
            yield container_builder
    else:
        yield None

def test_something_with_slc(deploy_slc):
    deploy_slc("MY_LANGUAGE_ALIAS")
    ...

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_slc-1.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_exasol_slc-1.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file pytest_exasol_slc-1.1.1.tar.gz.

File metadata

  • Download URL: pytest_exasol_slc-1.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.0 CPython/3.10.20 Linux/6.17.0-1018-azure

File hashes

Hashes for pytest_exasol_slc-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f1fc59aa2f29a9284b1c30607527b7eb9e46d219f6a1c655de55023f62f41501
MD5 ce0bf16becec81c02b0e5b8750b5039b
BLAKE2b-256 2dd274157a15429239f0d15264052600380933af2a06fd7628f376d1def89051

See more details on using hashes here.

File details

Details for the file pytest_exasol_slc-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pytest_exasol_slc-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.0 CPython/3.10.20 Linux/6.17.0-1018-azure

File hashes

Hashes for pytest_exasol_slc-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57ec8ce7dfd3883273d5f3b5b26850d67d5187389b134f5d4dd2c196a68e1269
MD5 e73723c94826abdeda74e5176f9f7126
BLAKE2b-256 510cb00a65c98b5ac8a6e7d13d0dfc99ebda128e727a74c19d7fc19f44e95f88

See more details on using hashes here.

Supported by

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