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_smoke(self):
"""Basic smoke test for consistency_check."""
assert chk(
"Painting colour on color", self.l, self.err, self.msg) != []
assert chk(
"Painting colour on colour", self.l, self.err, self.msg) == []
assert chk(
"Painting color on color", self.l, self.err, self.msg) == []
def test_smoke(self):
"""Basic smoke test for consistency_check."""
assert chk(
"Painting colour on color", self.l, self.err, self.msg) != []
assert chk(
"Painting colour on colour", self.l, self.err, self.msg) == []
assert chk(
"Painting color on color", self.l, self.err, self.msg) == []
def test_smoke(self):
"""Basic smoke test for consistency_check."""
assert chk(
"Painting colour on color", self.l, self.err, self.msg) != []
assert chk(
"Painting colour on colour", self.l, self.err, self.msg) == []
assert chk(
"Painting color on color", self.l, self.err, self.msg) == []
def this_check(self):
"""Boilerplate."""
return chk
def check(text):
"""Check the text."""
err = "consistency.spacing"
msg = "Inconsistent spacing after period (1 vs. 2 spaces)."
regex = ["[\.\?!] [A-Z]", "[\.\?!] [A-Z]"]
return consistency_check(text, [regex], err, msg)
["advisor", "adviser"],
# ["analyse", "analyze"],
["centre", "center"],
["colour", "color"],
["emphasise", "emphasize"],
["finalise", "finalize"],
["focussed", "focused"],
["labour", "labor"],
["learnt", "learned"],
["organise", "organize"],
["organised", "organized"],
["organising", "organizing"],
["recognise", "recognize"],
]
return consistency_check(text, word_pairs, err, msg)