Ansgar pushed to branch master at Debian FTP Team / dak
Commits:
2 changed files:
Changes:
| ... | ... | @@ -33,12 +33,16 @@ def test_Architecture(session): |
| 33 | 33 |
def test_Architecture___eq__():
|
| 34 | 34 |
obj = Architecture('arch')
|
| 35 | 35 |
|
| 36 |
- assert str(obj) == 'arch'
|
|
| 37 |
- assert 'arch' == str(obj)
|
|
| 36 |
+ with pytest.warns(DeprecationWarning):
|
|
| 37 |
+ assert obj == 'arch'
|
|
| 38 |
+ with pytest.warns(DeprecationWarning):
|
|
| 39 |
+ assert 'arch' == obj
|
|
| 38 | 40 |
|
| 39 | 41 |
|
| 40 | 42 |
def test_Architecture___ne__():
|
| 41 | 43 |
obj = Architecture('arch')
|
| 42 | 44 |
|
| 43 |
- assert str(obj) != 'zzzz'
|
|
| 44 |
- assert 'zzzz' != str(obj)
|
|
| 45 |
+ with pytest.warns(DeprecationWarning):
|
|
| 46 |
+ assert obj != 'zzzz'
|
|
| 47 |
+ with pytest.warns(DeprecationWarning):
|
|
| 48 |
+ assert 'zzzz' != obj
|
| ... | ... | @@ -32,12 +32,16 @@ def test_Section(session): |
| 32 | 32 |
def test_Section___eq__():
|
| 33 | 33 |
obj = Section('section')
|
| 34 | 34 |
|
| 35 |
- assert str(obj) == 'section'
|
|
| 36 |
- assert 'section' == str(obj)
|
|
| 35 |
+ with pytest.warns(DeprecationWarning):
|
|
| 36 |
+ assert obj == 'section'
|
|
| 37 |
+ with pytest.warns(DeprecationWarning):
|
|
| 38 |
+ assert 'section' == obj
|
|
| 37 | 39 |
|
| 38 | 40 |
|
| 39 | 41 |
def test_Section___ne__():
|
| 40 | 42 |
obj = Section('section')
|
| 41 | 43 |
|
| 42 |
- assert str(obj) != 'zzzz'
|
|
| 43 |
- assert 'zzzz' != str(obj)
|
|
| 44 |
+ with pytest.warns(DeprecationWarning):
|
|
| 45 |
+ assert obj != 'zzzz'
|
|
| 46 |
+ with pytest.warns(DeprecationWarning):
|
|
| 47 |
+ assert 'zzzz' != obj
|