simple-settings plugin for pytest
Project description
pytest-simple-settings
Usage
With default simple_settings.settings:
from simple_settings import settings
def test_foo(fake_settings):
fake_settings.FOO = 1
fake_settings.set(BAR=2)
assert settings.FOO == 1
assert settings.BAR == 2
With custom LazySettings instance
import pytest
from simple_settings import LazySettings
instance = LazySettings('settings')
@pytest.fixture()
def settings_instance():
return instance
def test_foo(fake_settings):
fake_settings.FOO = 1
fake_settings.set(BAR=2)
assert instance.FOO == 1
assert instance.BAR == 2
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
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-simple-settings-0.1.5.tar.gz.
File metadata
- Download URL: pytest-simple-settings-0.1.5.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30dd0a7ebf1e7e4a2f2d70afe50e47f4d2073499bb9d3fb22fab2f57eb8528e4
|
|
| MD5 |
5dde298e7f89e920397c8c7fd22a6087
|
|
| BLAKE2b-256 |
f593f585cb649fad2cfcb95f083f5503465606456846f3d7bfcd9bde17bfb803
|
File details
Details for the file pytest_simple_settings-0.1.5-py2.py3-none-any.whl.
File metadata
- Download URL: pytest_simple_settings-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d06c317aaf55a723fa3fdaa0b5e4959062f4f2e9d501376e26c8778e0b3e628d
|
|
| MD5 |
970d4116b0c14946e6ef7f218f0a8cbd
|
|
| BLAKE2b-256 |
756261a0c29a4467eddead271f5ace2d4f8095b428698600fbc68820570de1fc
|