... 'I just want to add a quality string that has no bad characters')
... except ValueError as err:
... print(err)
...
"I just want to add a quality string that has no bad characters" is an invalid lipogram for "Lipogram", Perec wrote a book without any "e", you could not do it in a simple sentence?
2. the character "e" is in the value and warnings_only is set to True:
>>> try:
... LipogramOption('lipo',
... 'Lipogram',
... 'I just want to add a quality string that has no bad characters',
... warnings_only=True)
... except ValueError as err:
... print(err)
...
"I just want to add a quality string that has no bad characters" is an invalid lipogram for "Lipogram", Perec wrote a book without any "e", you could not do it in a simple sentence?
3. the value is too short
>>> try:
... LipogramOption('lipo',
... 'Lipogram',
... 'I just want to add a quality string that has no bad symbols')
... except ValueError as err:
... print(err)
...
"I just want to add a quality string that has no bad symbols" is an invalid lipogram for "Lipogram", you must have at least 100 characters in the sentence
4. the value is too short and warnings_only is set to True:
>>> warnings.simplefilter('always', ValueWarning)
>>> with warnings.catch_warnings(record=True) as warn:
... LipogramOption('lipo',
... 'Lipogram',
... 'I just want to add a quality string that has no bad symbols',
... warnings_only=True)
... if warn:
... print(warn[0].message)
...
attention, "I just want to add a quality string that has no bad symbols" could be an invalid lipogram for "Lipogram", it would be better to have at least 100 characters in the sentence
5. set minimum length to 50 characters, the value is valid:
>>> LipogramOption('lipo',
... 'Lipogram',
... 'I just want to add a quality string that has no bad symbols',