Skip to content

Commit

Permalink
v.0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
myslak71 authored and myslak71 committed Aug 2, 2019
1 parent 3101c7a commit cdb1f41
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://travis-ci.org/myslak71/flake8-koles.svg?branch=master)](https://travis-ci.org/myslak71/flake8-koles)
[![Coverage Status](https://coveralls.io/repos/github/myslak71/flake8-koles/badge.svg?branch=master)](https://coveralls.io/github/myslak71/flake8-koles?branch=master)
![image](https://img.shields.io/badge/python-3.7-blue.svg)
![image](https://img.shields.io/badge/version-0.0.1-yellow)
![image](https://img.shields.io/badge/version-0.1.0-yellow)

Watch your language young pal!

Expand Down
4 changes: 2 additions & 2 deletions flake8_koles/__about__.py
Expand Up @@ -2,11 +2,11 @@

__title__ = 'flake8-koles'
__description__ = 'Watch your language young lad! Swears nad curses linter.'
__version__ = 'v0.0.1'
__version__ = 'v0.1.0'
__author__ = 'myslak71'
__author_email__ = 'myslak@protonmail.com'
__url__ = 'https://github.com/myslak71/flake8-koles'
__license__ = 'MIT'
__copyright__ = 'Copyright 2019 myslak71'
__keywords__ = ['linter', 'flake8', 'swears', 'curses']
__download_url__ = 'https://github.com/myslak71/flake8-koles/archive/v0.0.1.tar.gz'
__download_url__ = 'https://github.com/myslak71/flake8-koles/archive/v0.1.0.tar.gz'
24 changes: 24 additions & 0 deletions tests/test_checker.py
Expand Up @@ -3,6 +3,7 @@
from unittest.mock import Mock

import pytest
from flake8.options.manager import OptionManager, Option

from flake8_koles.checker import KolesChecker

Expand Down Expand Up @@ -221,3 +222,26 @@ def test_run(
(1, 5, 'KOL001 Bad language found: v***', KolesChecker),
(3, 4, 'KOL001 Bad language found: b**', KolesChecker),
(3, 8, 'KOL001 Bad language found: w****', KolesChecker)]


def test_add_options(koles_checker):
"""Test that all options are added to the parser."""
option_manager = OptionManager()
koles_checker.add_options(option_manager)

assert repr(option_manager.options) == repr([
Option(
long_option_name="--ignore-shorties", default=0, type="int", parse_from_config=True
),
Option(
long_option_name="--censor-msg", default=0, parse_from_config=True, action='store_true'
)
])


def test_parse_options(koles_checker):
"""Test that options are correctly assigned to the class."""
test_options = {'kick_it': True}
koles_checker.parse_options(test_options)

assert koles_checker.options == test_options

0 comments on commit cdb1f41

Please sign in to comment.