Skip to main content SDK integration for e2e tests

Project description

PyPI version Python versions SDK integration for e2e tests


  • Pytest >= 5.0
  • splitio_client >= 8.0


You can install “pytest-splitio” via pip from PyPI:

$ pip install pytest-splitio


There are two types of markers - skipif_split_not_equal and skipif_split_equals.

  • This test will be skipped if ‘cool-split-name’ split’s value is not equal to “on” value in environment
import pytest

@pytest.mark.skipif_split_not_equal('cool-split-name', 'on')
def test_m1():
  • This test will be skipped if ‘cool-split-name’ split’s value is equal to “off” value
import pytest

@pytest.mark.skipif_split_equals('cool-split-name', 'off')
def test_m2():

You can also add some logic inside your test, by checking split’s treatment value

  • Make sure to pass ‘split’ argument to your test function
def test_m3(split):
    split_treatment = split.get_treatment('cool-split-name')
    if split_treatment == 'on':

Now to Run your tests you need to specify –SPLIT-KEY argument or create an environment variable SPLIT_KEY, which should be environment SDK key:

$ python -m pytest --SPLIT-KEY="your-split-sdk-key"


Contributions are very welcome.


Distributed under the terms of the MIT license, “pytest-splitio” is free and open source software


If you encounter any problems, please file an issue along with a detailed description.

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-splitio-0.1.0.tar.gz (3.4 kB view hashes)

Uploaded source

Built Distribution

pytest_splitio-0.1.0-py3-none-any.whl (3.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page