Coverage for tests\sampling\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/sampling/test_abstract.py
5* Description: Unittests for the `sampling.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.sampling.abstract import AbstractConstraintsSampling
20# ==============================================================================
21# test_AbstractConstraintsSampling_is_abstract
22# ==============================================================================
23def test_AbstractConstraintsSampling_is_abstract():
24 """
25 Test that the `sampling.abstract.AbstractConstraintsSampling` class is abstract.
26 """
28 # Check `TypeError` for initialization of `AbstractConstraintsSampling`.
29 with pytest.raises(TypeError, match="Can't instantiate abstract class"):
30 AbstractConstraintsSampling()