Hello everybody
During the course of the evaluations of the python exercise “isogram”, it experienced a strange behavior of the test_empty_string(self) function.
Since an isogram “…is a word or phrase without a repeating letter…”, in my program, I first checked if the variable string was empty and returned False if it was empty. An empty string shouldn’t be neither a word nor an isogram[1].
I searched for pull requests in the repository and previous related posts in the forum (test_empty_string #exercism:bugs-and-features
), but I haven’t found any.
These are the proposed changes:
diff --git a/exercises/practice/isogram/isogram_test.py b/exercises/practice/isogram/isogram_test.py
index c65984f6..80c47839 100644
--- a/exercises/practice/isogram/isogram_test.py
+++ b/exercises/practice/isogram/isogram_test.py
@@ -11,7 +11,7 @@ from isogram import (
class IsogramTest(unittest.TestCase):
def test_empty_string(self):
- self.assertIs(is_isogram(""), True)
+ self.assertIs(is_isogram(""), False)
def test_isogram_with_only_lower_case_characters(self):
self.assertIs(is_isogram("isogram"), True)
I didn’t create a pull request (as instructed in guidelines), but I am ready to create it, since the proposed changes have been already pushed into another branch.
Thank you for your help and sorry for the inconvenience. Please excuse me if I am wrong.
Please let me know if there is anything else I might do.
[1] wiktionary entry on isogram: A word or phrase in which each letter occurs the same number of times.