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_loader_populates_registry_only_with_steps_from_given_file_content(self):
content = dedent("""
@step("print hello")
def printf():
print("hello")
@hello("some other decorator")
@step("print .")
def print_word(word):
print(word)
""")
load_steps(PythonFile.parse("foo.py", content))
self.assertTrue(registry.is_implemented("print hello"))
self.assertTrue(registry.is_implemented("print {}."))
self.assertFalse(registry.is_implemented("some other decorator"))