Skip to main content

No project description provided

Project description

pytest-exasol-slc Plugin

The pytest-exasol-slc plugin provides a 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 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-0.4.2.tar.gz (3.9 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-0.4.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_exasol_slc-0.4.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for pytest_exasol_slc-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6f5c6faafed143fd6e978ddbef5481d46ca60537925493df44fa0a4fec25fb73
MD5 18e3be1ba3e3bc62173e20704269526a
BLAKE2b-256 139f94ca528704f9633dcc25af31edca7dedaea545645ca41f51b87b2c687a59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_exasol_slc-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for pytest_exasol_slc-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 83214d5cf1000b31f42feaa243bc35a1708ec9d6fd18f60b2ff12b9f4ae4ffe0
MD5 849a49f1426412d57a40f50061b8d711
BLAKE2b-256 cfa2b1cf286beb5c69436316aa2a7acd9871239610b5c0b1202dd3d129ce2ea8

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