Skip to content

Commit

Permalink
Fix item collection (#41)
Browse files Browse the repository at this point in the history
* Fix item collection

* Fix linting

* Update Changelog
  • Loading branch information
Shutgun authored May 30, 2022
1 parent 9651439 commit 2d23b64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.6.2] - 2022/05/30

### Fixed

* Fix item collection in case no test cases are selected

## [5.6.1] - 2022/05/24

### Fixed
Expand Down
6 changes: 4 additions & 2 deletions pytest_adaptavist/_pytest_adaptavist.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,10 @@ def _setup_item_collection(
self, items: list[pytest.Item], collected_project_keys: list[str], collected_items: dict[str, list[pytest.Item]]
):
"""Setup and prepare collection of available test methods."""
if items:
config = items[0].config
if not items:
return

config = items[0].config

# define the test case keys to be processed
test_case_keys = self.test_case_keys
Expand Down

0 comments on commit 2d23b64

Please sign in to comment.