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

1# SPDX-License-Identifier: GPL-2.0-or-later 

2 

3import pytest 

4 

5from .dbconn import Architecture, Section 

6 

7 

8def test_Architecture___eq__(): 

9 obj = Architecture("arch") 

10 

11 with pytest.warns(DeprecationWarning): 

12 assert obj == "arch" 

13 with pytest.warns(DeprecationWarning): 

14 assert "arch" == obj 

15 

16 

17def test_Architecture___ne__(): 

18 obj = Architecture("arch") 

19 

20 with pytest.warns(DeprecationWarning): 

21 assert obj != "zzzz" 

22 with pytest.warns(DeprecationWarning): 

23 assert "zzzz" != obj 

24 

25 

26def test_Section___eq__(): 

27 obj = Section("section") 

28 

29 with pytest.warns(DeprecationWarning): 

30 assert obj == "section" 

31 with pytest.warns(DeprecationWarning): 

32 assert "section" == obj 

33 

34 

35def test_Section___ne__(): 

36 obj = Section("section") 

37 

38 with pytest.warns(DeprecationWarning): 

39 assert obj != "zzzz" 

40 with pytest.warns(DeprecationWarning): 

41 assert "zzzz" != obj