Skip to content

Commit 9367e48

Browse files
committed
getting coverage working
1 parent edfa8ee commit 9367e48

File tree

3 files changed

+21
-27
lines changed

3 files changed

+21
-27
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ env:
1111
- DJANGO=django==1.8.18
1212

1313
install:
14-
- pip install $DJANGO django-jinja==2.3.1 flake8
14+
- pip install $DJANGO django-jinja==2.3.1 flake8 coverage
1515

1616
script:
1717
- flake8 bootstrapform_jinja/
18-
- cd testing && python manage.py test
18+
- cd testing && coverage run --source=bootstrapform_jinja manage.py test && mv .coverage ..
19+
20+
after_success:
21+
- ls -lha
22+
- bash <(curl -s https://codecov.io/bash)
1923

2024
deploy:
2125
- provider: pypi

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ max-complexity = 10
66
python-tag = py36
77

88
[coverage:run]
9-
source = pydantic
9+
source = bootstrapform_jinja
1010
branch = True
1111

1212
[coverage:report]

testing/settings.py

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,17 @@
3232
}
3333
}
3434

35-
import django
36-
if django.VERSION >= (1, 8):
37-
TEMPLATES = [
38-
{
39-
'BACKEND': 'django_jinja.backend.Jinja2',
40-
'APP_DIRS': True,
41-
'DIRS': (
42-
os.path.join(BASE_DIR, 'templates'),
43-
),
44-
'OPTIONS': {
45-
'match_extension': '.jinja',
46-
'trim_blocks': True,
47-
'lstrip_blocks': True,
48-
}
49-
},
50-
]
51-
else:
52-
TEMPLATE_DIRS = (
53-
os.path.join(BASE_DIR, 'templates'),
54-
)
55-
TEMPLATE_LOADERS = (
56-
'django_jinja.loaders.FileSystemLoader',
57-
'django_jinja.loaders.AppLoader'
58-
)
35+
TEMPLATES = [
36+
{
37+
'BACKEND': 'django_jinja.backend.Jinja2',
38+
'APP_DIRS': True,
39+
'DIRS': (
40+
os.path.join(BASE_DIR, 'templates'),
41+
),
42+
'OPTIONS': {
43+
'match_extension': '.jinja',
44+
'trim_blocks': True,
45+
'lstrip_blocks': True,
46+
}
47+
},
48+
]

0 commit comments

Comments
 (0)