Initial Revision
[ohcount] / test / unit / python_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class PythonTest < LingoTest
4         def test_comment
5                 lb = [Ohcount::LanguageBreakdown.new("python", "", "#comment", 0)]
6                 assert_equal lb, Ohcount::parse(" #comment", "python")
7         end
8
9         def test_strings
10                 lb = [Ohcount::LanguageBreakdown.new("python", "'''abc\n#not a 'comment\n'''", "", 0)]
11                 assert_equal lb, Ohcount::parse("'''abc\n#not a 'comment\n'''", "python")
12         end
13
14         def test_comprehensive
15                 verify_parse("py1.py")
16         end
17 end