comparison clipkit_repo/tests/unit/test_warnings.py @ 0:49b058e85902 draft

"planemo upload for repository https://github.com/jlsteenwyk/clipkit commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
author padge
date Fri, 25 Mar 2022 13:04:31 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:49b058e85902
1 import pytest
2
3 from clipkit.warnings import check_if_all_sites_were_trimmed, check_if_entry_contains_only_gaps
4
5
6 class TestWarnings(object):
7 def test_all_sites_trimmed(self, mocker):
8 mocked_warning = mocker.patch('clipkit.warnings.logger.warning')
9 keepD = dict(some_id="")
10 check_if_all_sites_were_trimmed(keepD)
11 mocked_warning.assert_called_once_with('WARNING: All sites trimmed from alignment. Please use different parameters.')
12
13 def test_gaps_only(self, mocker):
14 mocked_warning = mocker.patch('clipkit.warnings.logger.warning')
15 keepD = dict(some_id="-")
16 check_if_entry_contains_only_gaps(keepD)
17 mocked_warning.assert_called_once_with('''WARNING: header id 'some_id' contains only gaps''')