Run tests using source from GitHub
This commit is contained in:
parent
d08efd2b62
commit
70b2af8654
4 changed files with 39 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# NOTE(mhayden): The tests require network access to talk to some Azure
|
||||
# endpoints, so the tests are disabled for now. 😞
|
||||
%bcond_with tests
|
||||
%bcond_without tests
|
||||
|
||||
%global srcname azure-batch
|
||||
|
||||
|
|
@ -10,7 +10,9 @@ Release: %autorelease
|
|||
Summary: Microsoft Azure Batch Client Library for Python
|
||||
License: MIT
|
||||
URL: https://pypi.org/project/%{srcname}/
|
||||
Source0: %{pypi_source %{srcname} %{version} zip}
|
||||
# This source comes from making a git archive of the main azure-sdk-for-python
|
||||
# repository. To reproduce the source code, run the generate-source.sh script.
|
||||
Source0: %{srcname}-%{version}.tgz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
@ -24,6 +26,7 @@ BuildRequires: python3dist(azure-mgmt-resource)
|
|||
BuildRequires: python3dist(azure-sdk-tools)
|
||||
BuildRequires: python3dist(pytest)
|
||||
BuildRequires: python3dist(pytest-aiohttp)
|
||||
BuildRequires: python3dist(python-dotenv)
|
||||
%endif
|
||||
|
||||
%global _description %{expand:
|
||||
|
|
@ -34,7 +37,6 @@ Microsoft Azure Batch Client Library for Python}
|
|||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
Obsoletes: python3-azure-sdk < 5.0.1
|
||||
|
||||
%description -n python3-%{srcname} %{_description}
|
||||
|
||||
|
|
@ -44,7 +46,7 @@ Obsoletes: python3-azure-sdk < 5.0.1
|
|||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -56,9 +58,13 @@ Obsoletes: python3-azure-sdk < 5.0.1
|
|||
%pyproject_save_files azure
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%pytest --disable-warnings
|
||||
%pyproject_check_import
|
||||
|
||||
%if %{with tests}
|
||||
%pytest \
|
||||
-k "not test_batch_applications \
|
||||
and not test_batch_files"
|
||||
%endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue