Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

Expand Down Expand Up @@ -45,6 +46,7 @@ jobs:
shell: powershell

strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ $ pip install launchdarkly-openfeature-server
### Usage

```python
from ldclient import Config
from ld_openfeature import LaunchDarklyProvider
from ld_openfeature import LaunchDarklyProvider, Config
from openfeature import api

openfeature_provider = LaunchDarklyProvider(Config("sdk-key"))
Expand Down
2 changes: 2 additions & 0 deletions ld_openfeature/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from ldclient.config import Config
from ld_openfeature.provider import LaunchDarklyProvider

__all__ = [
'Config',
'LaunchDarklyProvider'
]
8 changes: 4 additions & 4 deletions tests/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from unittest.mock import patch

import pytest
from ldclient import Config, LDClient
from ldclient import LDClient
from ldclient.evaluation import EvaluationDetail
from ldclient.integrations.test_data import TestData
from openfeature.evaluation_context import EvaluationContext
Expand All @@ -12,7 +12,7 @@
from openfeature.flag_evaluation import Reason
from openfeature import api

from ld_openfeature import LaunchDarklyProvider
from ld_openfeature import LaunchDarklyProvider, Config
from tests.test_data_sources import FailingDataSource, StaleDataSource, UpdatingDataSource, DelayedFailingDataSource


Expand Down Expand Up @@ -115,7 +115,7 @@ def test_invalid_types_generate_type_mismatch_results(provider: LaunchDarklyProv
pytest.param(['default-value'], True, ['default-value'], list, 'resolve_object_details'),
pytest.param(['default-value'], 1, ['default-value'], list, 'resolve_object_details'),
pytest.param(['default-value'], 'return-string', ['default-value'], list, 'resolve_object_details'),

pytest.param({'key': 'default'}, {'key': 'return'}, {'key': 'return'}, dict, 'resolve_object_details'),
pytest.param({'key': 'default'}, True, {'key': 'default'}, dict, 'resolve_object_details'),
pytest.param({'key': 'default'}, 1, {'key': 'default'}, dict, 'resolve_object_details'),
Expand All @@ -137,7 +137,7 @@ def test_check_method_and_result_match_type(

method = getattr(provider, method_name)
resolution_details = method("check-method-flag", default_value, evaluation_context)

assert resolution_details.value == expected_value
#assert isinstance(resolution_details.value, expected_type)

Expand Down