forked from jaraco/cssutils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_stylesheet.py
More file actions
38 lines (32 loc) · 1020 Bytes
/
test_stylesheet.py
File metadata and controls
38 lines (32 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Testcases for cssutils.stylesheets.StyleSheet"""
import cssutils
class TestStyleSheet:
def test_init(self):
"StyleSheet.__init__()"
s = cssutils.stylesheets.StyleSheet()
assert s.type == 'text/css'
assert s.href is None
assert s.media is None
assert s.title == ''
assert s.ownerNode is None
assert s.parentStyleSheet is None
assert s.alternate is False
assert s.disabled is False
s = cssutils.stylesheets.StyleSheet(
type='unknown',
href='test.css',
media=None,
title='title',
ownerNode=None,
parentStyleSheet=None,
alternate=True,
disabled=True,
)
assert s.type == 'unknown'
assert s.href == 'test.css'
assert s.media is None
assert s.title == 'title'
assert s.ownerNode is None
assert s.parentStyleSheet is None
assert s.alternate
assert s.disabled