Commits

Eddie Flores committed 9365b49

Adds hgignore, changes made to readme

Comments (0)

Files changed (4)

+syntax: glob
+*.pyc
+
 =====
 
 Rhind is a simple static site generator.
+(Under development)
 
 Features
 --------
 * Templating via Mako.
 * Simple markup via Markdown.
 * Syntax highlighting via Pygments.
-* Automatic Git commits.
 
 Dependencies
 ------------

tests/test_post.py

-"""Test the build process (post.py)"""
-from rhind.post import Post
-import unittest
-import markdown
-
-
-class TestPost(unittest.TestCase):
-    """Tests Builder"""
-
-    def setUp(self):
-        self.yml = """title: Testing Builder
-date: Apr 8 2011
-categories: general, tdd
-tags: test, build, stats
-"""
-        self.mkd = """Sample Post
-===========
-Hi this is a sample post written in markdown.
-"""
-        self.src = "---\n{0}---\n{1}".format(self.yml, self.mkd)
-        self.post = Post(self.src)
-        self.test_split()
-
-    def test_split(self):
-        """Should split the src into yaml header and markdown content."""
-        self.parts = self.post.do_split(self.src)
-        self.assertEqual(self.parts[0], self.yml)
-        self.assertEqual(self.parts[1], self.mkd)
-
-    def test_parse_yaml(self):
-        """Should parse the yaml header and return a dict."""
-        test_info = {"title"     : "Testing Builder",
-                     "date"      : "Apr 8 2011",
-                     "categories": ["general", "tdd"],
-                     "tags"      : ["test", "build", "stats"]}
-        parsed_info = self.post.parse_yaml(self.parts[0])
-
-        self.assertEqual(test_info['title'], parsed_info['title'])
-        self.assertEqual(test_info['date'], parsed_info['date'])
-
-        for c in test_info['categories']:
-            self.assertTrue(c in parsed_info['categories'])
-        for t in test_info['tags']:
-            self.assertTrue(t in parsed_info['tags'])
-
-    def test_parse_markdown(self):
-        """Should parse the markdown and return html as string."""
-        test_html = markdown.markdown(self.mkd)
-        parsed_html = self.post.parse_markdown(self.parts[1])
-        self.assertEqual(test_html, parsed_html)
-    
-    def test_parse(self):
-        """Should extract parsed content and set to class variables."""
-        self.post.parse()
-
-        test_title = "Testing Builder"
-        test_date = "Apr 8 2011"
-        test_categories = ["general", "tdd"]
-        test_tags = ["test", "build", "stats"]
-
-        self.assertEqual(test_title, self.post.title)
-        self.assertEqual(test_date, self.post.date.worded())
-        self.assertEqual(test_categories, self.post.categories)
-        self.assertEqual(test_tags, self.post.tags)
-        self.assertEqual(markdown.markdown(self.mkd), self.post.html)
-        
-    def test_permalink(self):
-        """Should return the post's permalink in URL friendly format."""
-        self.assertEqual('2011/4/8/Testing-Builder',self.post.permalink())
-
-if __name__ == '__main__':
-    unittest.main()
-

tests/test_post.pyc

Binary file modified.