示例#1
0
文件: testcss.py 项目: yttiktak/scour
 def runTest(self):
     r = parseCssString('foo {}')
     self.assertEqual(len(r), 1, 'Element selector not returned')
     self.assertEqual(r[0]['selector'], 'foo',
                      'Selector for foo not returned')
     self.assertEqual(len(r[0]['properties']), 0,
                      'Property list for foo not empty')
示例#2
0
文件: testcss.py 项目: yttiktak/scour
 def runTest(self):
     r = parseCssString('foo { bar: baz}')
     self.assertEqual(len(r), 1, 'Element selector not returned')
     self.assertEqual(r[0]['selector'], 'foo',
                      'Selector for foo not returned')
     self.assertEqual(len(r[0]['properties']), 1,
                      'Property list for foo did not have 1')
     self.assertEqual(r[0]['properties']['bar'], 'baz',
                      'Property bar did not have baz value')
示例#3
0
文件: testcss.py 项目: yttiktak/scour
 def runTest(self):
     r = parseCssString('')
     self.assertEqual(len(r), 0, 'Blank string returned non-empty list')
     self.assertEqual(type(r), type([]), 'Blank string returned non list')
示例#4
0
文件: testcss.py 项目: Ede123/scour
 def runTest(self):
     r = parseCssString('foo { bar: baz}')
     self.assertEqual(len(r), 1, 'Element selector not returned')
     self.assertEqual(r[0]['selector'], 'foo', 'Selector for foo not returned')
     self.assertEqual(len(r[0]['properties']), 1, 'Property list for foo did not have 1')
     self.assertEqual(r[0]['properties']['bar'], 'baz', 'Property bar did not have baz value')
示例#5
0
文件: testcss.py 项目: Ede123/scour
 def runTest(self):
     r = parseCssString('foo {}')
     self.assertEqual(len(r), 1, 'Element selector not returned')
     self.assertEqual(r[0]['selector'], 'foo', 'Selector for foo not returned')
     self.assertEqual(len(r[0]['properties']), 0, 'Property list for foo not empty')
示例#6
0
文件: testcss.py 项目: Ede123/scour
 def runTest(self):
     r = parseCssString('')
     self.assertEqual(len(r), 0, 'Blank string returned non-empty list')
     self.assertEqual(type(r), type([]), 'Blank string returned non list')