diff --git a/HISTORY.md b/HISTORY.md index b35b669..bd50007 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,8 @@ ## 0.10.19_preview / 2025-10-23 - Fixed issue where event type property Uom and description fields are swapped +- Fixed failing tests +- Updated requirements for tests ## 0.10.18_preview / 2025-07-30 diff --git a/adh_sample_library_preview/Tests/test_baseclient.py b/adh_sample_library_preview/Tests/test_baseclient.py index 636f4e8..d8e1c5b 100644 --- a/adh_sample_library_preview/Tests/test_baseclient.py +++ b/adh_sample_library_preview/Tests/test_baseclient.py @@ -34,11 +34,11 @@ def test_check_response_error_response(baseClient): def test_validate_parameters_raises_error(baseClient): with pytest.raises(TypeError): - baseClient.validateParameters('good', 'gooder', None) + baseClient.validateRequiredParameters('good', 'gooder', None) with pytest.raises(TypeError): - baseClient.validateParameters('good', 'gooder', []) + baseClient.validateRequiredParameters('good', 'gooder', []) def test_validate_parameters_valid(baseClient): - baseClient.validateParameters('good', 'gooder', 'goodest') \ No newline at end of file + baseClient.validateRequiredParameters('good', 'gooder', 'goodest') \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c027e2..5b66de4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,10 +45,12 @@ jobs: buildSteps: - script: | echo Install tools - call pip install wheel - call pip install twine + pip install wheel + pip install twine echo Build library - call python setup.py sdist bdist_wheel + python setup.py sdist bdist_wheel + echo Install library + pip install . echo Complete displayName: 'Build' @@ -63,10 +65,8 @@ jobs: secrets: 'TenantId, NamespaceId, ClientId, ClientSecret, Resource' - script: | - echo Install test tools - pip install pytest - echo Install requirements - pip install -r requirements.txt + echo Install requirements for tests + pip install ".[test]" echo Run tests cd ./adh_sample_library_preview/Tests python -m pytest --junitxml=junit/test-results-baseclient.xml test_baseclient.py --e2e True diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 945c9b4..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/setup.py b/setup.py index cf35deb..5de45b8 100644 --- a/setup.py +++ b/setup.py @@ -19,9 +19,11 @@ 'python-dateutil>=2.8.2', 'jsonpatch>=1.32' ], - tests_require = [ - 'pytest>=7.0.1', - ], + extras_require={ + 'test': [ + 'pytest>=7.0.1', + ] + }, python_requires='>=3.7', classifiers=[ 'Programming Language :: Python :: 3',