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_aliasprovides a meaningful name for the language alias. - Fixture
slc_builderprepares 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_exasol_slc-0.3.1.tar.gz.
File metadata
- Download URL: pytest_exasol_slc-0.3.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.15 Linux/5.15.0-1074-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1278051762f0c1965fd337d212dd6cbf551ea56090a5f1bb9fb6a1bb81149be0
|
|
| MD5 |
61870877d02a92a18ec63825d2df3f67
|
|
| BLAKE2b-256 |
69536e89c7018db7f6a65af1ff9836f25367bbdecd91f41a3666d3f20feb9bf4
|
File details
Details for the file pytest_exasol_slc-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pytest_exasol_slc-0.3.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.15 Linux/5.15.0-1074-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
061095b94f72f22961bbe3c05eac6f3f4ef41329a8623fcf6dc0b08e55b42a55
|
|
| MD5 |
cedb011ca01c555b4c63cf60f35fbbcf
|
|
| BLAKE2b-256 |
6362f93f82d2df0be47b9616f73033cf84d8f84bb560e7cfa0304158e62427b5
|