def test_command(source):
    """
    Creates a command to be run via subprocess
    :param source: str|None
    :return: list
    """
    command = ['pytest', '--cov', source] if source is not None else ['pytest', '--cov']
    return command