Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_string_with_chars_is_not_blank(self):
assert not is_blank(" # ")
def test_empty_string_is_blank(self):
assert is_blank("")
def test_string_with_space_is_blank(self):
assert is_blank(" ")
def test_string_with_narrow_nobreak_space_is_blank(self):
assert is_blank("\u202F \t")
def test_string_with_nobreak_space_is_blank(self):
assert is_blank("\u00A0\t ")
def test_string_with_whitespace_is_blank(self):
assert is_blank("\t\n ")
def test_string_with_tab_is_blank(self):
assert is_blank("\t")
def test_string_with_spaces_is_blank(self):
assert is_blank(" ")
def test_string_with_newline_is_blank(self):
assert is_blank("\n")
def characters(self, content):
if is_blank(content):
return
text = self.paragraph.append_text(content)
if self.link:
self.paragraph.chars_count_in_links += len(text)
self.br = False