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
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ verify_ssl = true
flake8 = "*"

[packages]
pytest = "*"
pytest-xdist = "*"
pytest = "==6.0.0"
pytest-xdist = "==1.34.0"
8 changes: 4 additions & 4 deletions tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2019, XMOS Ltd, All rights reserved
# Copyright (c) 2018-2020, XMOS Ltd, All rights reserved
import os.path
import pytest
import subprocess
Expand All @@ -10,7 +10,7 @@ def pytest_collect_file(parent, path):
if ((path.ext == ".c" or path.ext == ".xc")
and (path.basename.startswith("test_")
and "_Runner" not in path.basename)):
return UnityTestSource(path, parent)
return UnityTestSource.from_parent(parent, fspath=path)


class UnityTestSource(pytest.File):
Expand All @@ -32,13 +32,13 @@ def collect(self):
test_src_name + '_single_issue.xe')
test_bin_path_si = os.path.join('bin',
test_bin_name_si)
yield UnityTestExecutable(test_bin_path_si, self)
yield UnityTestExecutable.from_parent(self, name=test_bin_path_si)

test_bin_name_di = os.path.join(
test_src_name + '_dual_issue.xe')
test_bin_path_di = os.path.join('bin',
test_bin_name_di)
yield UnityTestExecutable(test_bin_path_di, self)
yield UnityTestExecutable.from_parent(self, name=test_bin_path_di)


class UnityTestExecutable(pytest.Item):
Expand Down