Coverage for tests\constraints\test_abstract.py: 100.00%
6 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-11-17 13:31 +0100
« prev ^ index » next coverage.py v7.3.2, created at 2023-11-17 13:31 +0100
1# -*- coding: utf-8 -*-
3"""
4* Name: interactive-clustering/tests/constraints/test_abstract.py
5* Description: Unittests for the `constraints.abstract` module.
6* Author: Erwan SCHILD
7* Created: 17/03/2021
8* Licence: CeCILL (https://cecill.info/licences.fr.html)
9"""
11# ==============================================================================
12# IMPORT PYTHON DEPENDENCIES
13# ==============================================================================
15import pytest
17from cognitivefactory.interactive_clustering.constraints.abstract import AbstractConstraintsManager
20# ==============================================================================
21# test_AbstractConstraintsManager_is_abstract
22# ==============================================================================
23def test_AbstractConstraintsManager_is_abstract():
24 """
25 Test that the `constraints.abstract.AbstractConstraintsManager` class is abstract.
26 """
28 # Check `TypeError` for initialization of `AbstractConstraintsManager`.
29 with pytest.raises(TypeError, match="Can't instantiate abstract class"):
30 AbstractConstraintsManager()