Coverage for daklib/test_dbconn.py: 100%
26 statements
« prev ^ index » next coverage.py v7.6.0, created at 2026-01-04 16:18 +0000
« prev ^ index » next coverage.py v7.6.0, created at 2026-01-04 16:18 +0000
1# SPDX-License-Identifier: GPL-2.0-or-later
3import pytest
5from .dbconn import Architecture, Section
8def test_Architecture___eq__():
9 obj = Architecture("arch")
11 with pytest.warns(DeprecationWarning):
12 assert obj == "arch"
13 with pytest.warns(DeprecationWarning):
14 assert "arch" == obj
17def test_Architecture___ne__():
18 obj = Architecture("arch")
20 with pytest.warns(DeprecationWarning):
21 assert obj != "zzzz"
22 with pytest.warns(DeprecationWarning):
23 assert "zzzz" != obj
26def test_Section___eq__():
27 obj = Section("section")
29 with pytest.warns(DeprecationWarning):
30 assert obj == "section"
31 with pytest.warns(DeprecationWarning):
32 assert "section" == obj
35def test_Section___ne__():
36 obj = Section("section")
38 with pytest.warns(DeprecationWarning):
39 assert obj != "zzzz"
40 with pytest.warns(DeprecationWarning):
41 assert "zzzz" != obj