From e4fea84b5e8b05c951f8bc2f296e4ac809ca233a Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Sat, 21 May 2016 14:21:55 +0200 Subject: [PATCH] improve test coverage for dependency detection --- tests/samples/codefiles/html-django.html | 37 ++++++++++ tests/test_dependencies.py | 94 ++++++++++++++++++++++++ tests/test_project.py | 92 ++++++++++++++++++++--- wakatime/dependencies/templates.py | 22 ------ wakatime/projects/git.py | 4 +- 5 files changed, 213 insertions(+), 36 deletions(-) create mode 100644 tests/samples/codefiles/html-django.html diff --git a/tests/samples/codefiles/html-django.html b/tests/samples/codefiles/html-django.html new file mode 100644 index 0000000..f9f3c59 --- /dev/null +++ b/tests/samples/codefiles/html-django.html @@ -0,0 +1,37 @@ +{% extends "common/base.html" %} +{% block subtitle %}Login{% endblock %} + +{% block js %} + {% compress 'js' %} + + {% endcompress %} +{% endblock %} + +{% block content %} +
+ + {% if error %} +
+
+
{{error}}
+
+
+ {% endif %} + {% with messages = get_flashed_messages() %} + {% if messages %} + {% for message in messages %} +
+
+
{{ message }}
+
+
+ {% endfor %} + {% endif %} + {% endwith %} + + + {% if form.errors.email %} +

{{form.errors.email[0]}}

+ {% endif %} +