scripts: tests: twister: Mixin test
Simple test checking whether our method for skipping unwanted test classes works. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commit is contained in:
parent
990b421b09
commit
0af7770132
5
scripts/tests/twister/test_data/mixins/test_to_ignore.py
Normal file
5
scripts/tests/twister/test_data/mixins/test_to_ignore.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from twisterlib.mixins import DisablePyTestCollectionMixin
|
||||
|
||||
class TestClassToIgnore(DisablePyTestCollectionMixin):
|
||||
def test_to_ignore(self):
|
||||
assert False
|
18
scripts/tests/twister/test_mixins.py
Normal file
18
scripts/tests/twister/test_mixins.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
"""
|
||||
Tests for the mixins class
|
||||
"""
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
|
||||
def test_disable_pytest_test_collection(test_data):
|
||||
test_path = os.path.join(test_data, 'mixins')
|
||||
|
||||
return_code = pytest.main([test_path])
|
||||
|
||||
assert return_code == 5
|
Loading…
Reference in a new issue