Skip to content

Regex conversions don't seem right #31

@paul545

Description

@paul545
self.assertRegex(a, b)      # assert a.search(b)
self.assertNotRegex(a, b)   # assert not a.search(b)

Not sure these are correct. I don't think search() is a method of string. It should probably be

import re

self.assertRegex(string, pattern) # assert re.match(pattern, string)
self.assertnotRegex(string, pattern) # assert not re.match(pattern, string)

Not sure if I'm missing something but that's what I did to get it to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions