Skip to main content

Build Status

Overview

  • pytest-symbols is a pytest plugin that adds support for passing test environment symbols into pytest tests.

  • The supported formats for symbols files are json and yaml.

Installation

pip install https://github.com/F5Networks/pytest-symbols.git

Usage

  • use the “–symbols” option to pass symbols into a pytest run:

py.test --symbols tests/demo.json -- tests/demo.py
  • use the “symbols” fixture to access symbols within a test:

def test_with_symbols_fixture(self, symbols):
    print symbols
    assert symbols.client_ip == "192.168.1.1"
    assert symbols.server_ip == "192.168.2.1"
  • use “pytest.symbols” to access symbols outside the “symbols” fixture:

import pytest

from pytest import symbols as foo


def test_without_symbols_fixture(self):
    print pytest.symbols
    assert symbols.client_ip == "192.168.1.1"
    assert symbols.server_ip == "192.168.2.1"
    print foo
    assert foo.client_ip == "192.168.1.1"
    assert foo.server_ip == "192.168.2.1"

Documentation

https://pytest-symbols.readthedocs.org

How to Contribute

  • Contributions are warmly welcomed.

  • Contributions should be associated with an open issue.

  • Find an open issue that interests you, or create a new one if you don’t find what you’re looking for in the backlog.

  • Fork this repository on GitHub and make your changes in the master branch (or branch off of it).

  • Write tests that verify the issue has been resolved (ie. the bug was fixed or the new feature works as expected).

  • Add yourself to AUTHORS.rst.

  • Send a pull request.

  • Sit back and wait for the plaudits to roll in.

Contact

qetools@f5.com

Support

See Support

Contributor License Agreement

Individuals or business entities who contribute to this project must have completed and submitted the F5 Contributor License Agreement to Openstack_CLA@f5.com prior to their code submission being included in this project.

License

Apache V2.0

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Release files for pytest-symbols 0.1.1

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-symbols 0.1.1
File Size Uploaded
pytest_symbols-0.1.1.tar.gz 4.2 kB Details

Release files / pytest_symbols-0.1.1.tar.gz

Download URL pytest_symbols-0.1.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d4d7736ae1b9c2a9044ed7b4ea60faa6b5856328d98adab3f5d8d80721253657
BLAKE2b-256 checksum
How to use checksums
6f72e66369f6c7cffcb55462cfa0395c04d98601a2d9dc33846ea3178cd2e118
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

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