Example #1
0
def doTest():
    text = 'body {width: 1px}'
    logs, warns, errors = doCssCheck(text)
    equal(len(logs), 2, 'two logs')
    equal(len(warns), 1, 'one warn happened')
    equal(len(errors), 1, 'one error happened')
    equal(warns[0], r'each rule in "body" need semicolon in the end, "width" has not', 'warn rule text is ok')
    equal(errors[0], r'should not set style for html tag in "body"', 'error rule text is ok')
Example #2
0
def doTest():
    logs, warns, errors = doCssTextCheck('/* @author: zhifu.wang**/ /* .test {width: 100px;}*/', 'test.css')
    equal(len(errors), 1, 'one error occur')
    equal(fill(errors[0]), 'empty css file "test.css"')

    logs, warns, errors = doCssTextCheck('/* @author: zhifu.wang**/ /* .test {width: 100px;}*/ \n.test { width: 100px; }', 'test.css')
    equal(len(errors), 0, 'no error now')
Example #3
0
def doTest():
    logs, warns, errors = doCssTextCheck('/* @author: zhifu.wang**/ /* .test {width: 100px;}*/', 'test.css')
    equal(len(errors), 1, 'one error occur')
    equal(errors[0], 'empty css file "test.css"')

    logs, warns, errors = doCssTextCheck('/* @author: zhifu.wang**/ /* .test {width: 100px;}*/ \n.test { width: 100px; }', 'test.css')
    equal(len(errors), 0, 'no error now')
Example #4
0
 def test_search(self):
     page = GoogleSearch(context)
     print(page.context)
     asserts.equal('3', 3)
Example #5
0
 def test_search(self):
     page = GoogleSearch(context)
     print(page.context)
     asserts.equal('3', 3)