OLD | NEW |
| (Empty) |
1 import unittest | |
2 | |
3 from scss.parser import Stylesheet | |
4 | |
5 | |
6 class TestSCSS( unittest.TestCase ): | |
7 | |
8 def setUp(self): | |
9 self.parser = Stylesheet(options=dict(compress=True)) | |
10 | |
11 def test_font_face(self): | |
12 src = """ | |
13 @font-face { | |
14 font-family: 'MyMinionPro'; | |
15 src: url('minion-webfont.eot?') format('eot'), | |
16 url('minion-webfont.woff') format('woff'), | |
17 url('minion-webfont.ttf') format('truetype'); | |
18 font-weight: normal; | |
19 font-style: normal; | |
20 font-size: ( 12px / 16px ) * 100%; | |
21 } | |
22 | |
23 @font-face { | |
24 font-family: 'MyMinionProItalic'; | |
25 src: url('minionpro-it-webfont.eot?') format('eot'), | |
26 url('minionpro-it-webfont.woff') format('woff'), | |
27 url('minionpro-it-webfont.ttf') format('truetype'); | |
28 font-weight: normal; | |
29 font-style: italic; | |
30 } | |
31 | |
32 h1,h2,h3, time, ol#using .number { | |
33 font-weight: normal; | |
34 font-family: 'MyMinionPro'; | |
35 } | |
36 """ | |
37 test = "@font-face{font-weight:normal;font-style:normal;font-size:75%;fo
nt-family:'MyMinionPro';src:url('minion-webfont.eot?') format('eot') , url('mini
on-webfont.woff') format('woff') , url('minion-webfont.ttf') format('truetype')}
@font-face{font-weight:normal;font-style:italic;font-family:'MyMinionProItalic';
src:url('minionpro-it-webfont.eot?') format('eot') , url('minionpro-it-webfont.w
off') format('woff') , url('minionpro-it-webfont.ttf') format('truetype')}h1, h2
, h3, time, ol#using .number{font-weight:normal;font-family:'MyMinionPro'}" | |
38 out = self.parser.loads(src) | |
39 self.assertEqual(test, out) | |
OLD | NEW |