Skip to main content

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")
    ...

Metadata

Release files for pytest-exasol-slc 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-exasol-slc 1.2.0
File Size Uploaded
pytest_exasol_slc-1.2.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-exasol-slc 1.2.0
File Interpreter ABI Platform
pytest_exasol_slc-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / pytest_exasol_slc-1.2.0.tar.gz

Download URL pytest_exasol_slc-1.2.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cb7fea0450e5e50c36e9776550f17c73dbb7ed4933bb7978940532442c41cad8
BLAKE2b-256 checksum
How to use checksums
ed33eb972a4ef2de2da9b03ee4a5aa5d08ded203493dbf4c56f99b26edcdbca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.0 CPython/3.10.21 Linux/6.17.0-1022-azure

Release files / pytest_exasol_slc-1.2.0-py3-none-any.whl

Download URL pytest_exasol_slc-1.2.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42357f6ee05ba20ff809ed8235c7d3c305a06f2519370017f0033bbb3ba373e6
BLAKE2b-256 checksum
How to use checksums
25c1de4ec698c434131c3c55e8e6e1ab0bbbff73570b65590093fd4bb9864832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.0 CPython/3.10.21 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page