diff options
| author | Sean Brant | 2013-07-13 11:01:18 -0500 |
|---|---|---|
| committer | Sean Brant | 2013-07-13 11:01:18 -0500 |
| commit | 784be915d581c59596d745a930438ce5e1c7799f (patch) | |
| tree | 56fc8d0e33cd9b9ccd8bef64f489ad95c4995329 /tests | |
| parent | fe8360e25afc60f6288470b88cdbccde61f265f3 (diff) | |
| download | pykss-784be915d581c59596d745a930438ce5e1c7799f.tar.bz2 | |
Fixes #4. Sections missing a reference are now ignored.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_section.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test_section.py b/tests/test_section.py index 200e65e..f2cb57d 100644 --- a/tests/test_section.py +++ b/tests/test_section.py @@ -23,21 +23,25 @@ Styleguide 2.1.1. """ self.section = Section(comment.strip(), 'example.css') - def test_parses_the_description(self): + def stest_parses_the_description(self): self.assertEqual(self.section.description, '# Form Button\n\nYour standard form button.') - def test_parses_the_modifiers(self): + def stest_parses_the_modifiers(self): self.assertEqual(len(self.section.modifiers), 4) - def test_parses_modifier_names(self): + def stest_parses_modifier_names(self): self.assertEqual(self.section.modifiers[0].name, ':hover') - def test_parses_modifier_descriptions(self): + def stest_parses_modifier_descriptions(self): self.assertEqual(self.section.modifiers[0].description, 'Highlights when hovering.') - def test_parses_the_example(self): + def stest_parses_the_example(self): expected = '<a href="#" class="button">Button</a><a href="#">Button</a>' self.assertEqual(self.section.example, expected) - def test_parses_the_styleguide_reference(self): + def stest_parses_the_styleguide_reference(self): self.assertEqual(self.section.section, '2.1.1') + + def test_handles_when_no_reference(self): + self.section = Section('Styleguide', 'example.css') + self.assertEqual(self.section.section, None) |
