我试图在页面上断言字符串是4个字母数字字符+" .com.pl"
Assert.equal("/^[^\w]{4}$/"+".com.pl", text_on_page())
我得到的错误是:
File "C:\Python27\lib\site-packages\unittestzero.py", line 55, in equal
assert first == second, msg
AssertionError: None
我应该使用Assert.equal方法吗?
我也在尝试
Assert.true(text_on_page().matches("/^[^\w]{4}$/"+".com.pl"))
但我明白了:
AttributeError: 'unicode' object has no attribute 'matches'