Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lipn-search
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien David
lipn-search
Commits
476fc418
Commit
476fc418
authored
4 years ago
by
Pranavan RAJENDIRAN
Browse files
Options
Downloads
Patches
Plain Diff
test_hamming.py modifier
parent
92700a29
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
test_hamming.py modifier
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
index_inverse/test/test_hamming.py
+16
-1
16 additions, 1 deletion
index_inverse/test/test_hamming.py
with
16 additions
and
1 deletion
index_inverse/test/test_hamming.py
+
16
−
1
View file @
476fc418
# -*- coding: utf-8 -*-
import
sys
sys
.
path
.
append
(
'
../src
'
)
from
hamming
import
hamming
import
unittest
class
TestHamming
(
unittest
.
TestCase
):
def
test_hamming
(
self
):
def
test_hamming
_1
(
self
):
result
=
hamming
(
"
mais
"
,
"
mats
"
)
self
.
assertEqual
(
result
,
1
)
# la longueur d'une lettre avec accent vaut 2 (ex:len('à')=2)
def
test_hamming_2
(
self
):
result
=
hamming
(
"
événement
"
,
"
avénement
"
)
self
.
assertEqual
(
result
,
-
1
)
def
test_hamming_3
(
self
):
result
=
hamming
(
"
lapin
"
,
"
poisson
"
)
self
.
assertEqual
(
result
,
-
1
)
def
test_hamming_4
(
self
):
result
=
hamming
(
"
chat
"
,
"
chien
"
)
self
.
assertEqual
(
result
,
-
1
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment