Skip to content

Commit 84c6707

Browse files
[circleci] Adopt conftest.py to pytest (9.0+)
Signed-off-by: Michal Princ <[email protected]>
1 parent a1499c8 commit 84c6707

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

erpcgen/test/conftest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#! /usr/bin/python
22

33
# Copyright (c) 2016 Freescale Semiconductor, Inc.
4-
# Copyright 2016 NXP
5-
# All rights reserved.
4+
# Copyright 2016-2026 NXP
65
#
76
# SPDX-License-Identifier: BSD-3-Clause
87

@@ -106,12 +105,12 @@ def pytest_configure(config: pytest.Config):
106105
pytestConfig = config
107106

108107

109-
def pytest_collect_file(file_path: pathlib.Path, path: path.local, parent: pytest.Collector):
108+
def pytest_collect_file(file_path: pathlib.Path, parent: pytest.Collector):
110109
# @brief Generates an ErpcgenFile for valid YAML test spec files.
111110
#
112111
# Files must start with "test" and have an extension of ".yml" to be processed.
113112

114-
if path.ext == ".yml" and path.basename.startswith("test"):
113+
if file_path.suffix == ".yml" and file_path.name.startswith("test"):
115114
if hasattr(ErpcgenFile, "from_parent"):
116115
return ErpcgenFile.from_parent(parent=parent, path=file_path)
117116
else:

0 commit comments

Comments
 (0)