view clipkit_repo/tests/unit/test_parser.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
line wrap: on
line source

import pytest

from clipkit.parser import create_parser

@pytest.fixture
def parser():
    return create_parser()


class TestParser(object):
    def test_required_only(self, parser):
        input_path = 'my/input/file.fa'
        parsed = parser.parse_args([input_path])
        assert parsed.input == input_path

    def test_mode(self, parser):
        input_path = 'my/input/file.fa'
        mode = 'gappy'
        parsed = parser.parse_args([input_path, '-m', mode])
        assert parsed.mode == mode