GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 9a1290...93e268 )
by thatsIch
01:03
created

TestLevenShtein   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 21
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A zero_words_should_equal_zero() 0 4 1
A first_word_one_longer_should_equal_one() 0 4 1
A same_word_should_equal_zero() 0 4 1
A second_word_one_longer_should_equal_one() 0 4 1
1
import sys
2
3
from unittest import TestCase
4
5
levenshtein = sys.modules["Rainmeter.completion.levenshtein"]
6
7
8
class TestLevenShtein(TestCase):
9
10
    def same_word_should_equal_zero(self):
11
        diff = levenshtein.levenshtein("hello", "hello")
12
13
        self.assertEqual(diff, 0)
14
15
    def zero_words_should_equal_zero(self):
16
        diff = levenshtein.levenshtein("", "")
17
18
        self.assertEqual(diff, 0)
19
20
    def first_word_one_longer_should_equal_one(self):
21
        diff = levenshtein.levenshtein("hello", "hell")
22
23
        self.assertEqual(diff, 1)
24
25
    def second_word_one_longer_should_equal_one(self):
26
        diff = levenshtein.levenshtein("hell", "hello")
27
28
        self.assertEqual(diff, 1)
29