Skip to content

Commit 506695e

Browse files
author
Rory McCann
committed
as part of the tests, run doctest on the README.md
1 parent 882a973 commit 506695e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apache_log_parser/tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import unittest
33
import apache_log_parser
44
import datetime
5+
import doctest
6+
import os.path
57

68
class ApacheLogParserTestCase(unittest.TestCase):
79
maxDiff = None
@@ -129,6 +131,10 @@ def test_issue10_ipv6(self):
129131
sample1 = '10.178.98.112 2607:5300:60:2c74:: - - [24/Mar/2015:16:40:45 -0400] "GET /category/blog/page/3 HTTP/1.0" 200 41207 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"'
130132
log_data1 = parser(sample1)
131133

134+
def test_doctest_readme(self):
135+
doctest.testfile("../README.md")
136+
137+
132138

133139
if __name__ == '__main__':
134140
unittest.main()

0 commit comments

Comments
 (0)