Skip to content
Snippets Groups Projects
Commit 72ed5f8b authored by nimrod's avatar nimrod
Browse files

- Added Bandit test.

- Fixed single issue found (autoescaping Jinja templates).
- Added parallel pre-commit, bandit tests in TravisCI.
- Bumped patch version.
parent 7d030048
No related branches found
No related tags found
No related merge requests found
--- ---
language: python language: python
python: ["2.7", "3.2", "3.3", "3.4", "3.5"] python: ["2.7", "3.2", "3.3", "3.4", "3.5", "3.6"]
dist: trusty dist: trusty
sudo: false sudo: false
cache: cache:
...@@ -9,14 +9,19 @@ matrix: ...@@ -9,14 +9,19 @@ matrix:
include: include:
- python: "3.5" - python: "3.5"
env: TOXENV=docs env: TOXENV=docs
- python: "3.5"
env: TOXENV=bandit
- python: "2.7"
env: TOXENV=pre-commit
- python: "3.5"
env: TOXENV=pre-commit
allow_failures: allow_failures:
- python: "3.2" - python: "3.2"
install: install:
- pip install tox-travis pre-commit - pip install tox-travis | cat
script: script:
- pre-commit run --all-files
- tox - tox
notifications: notifications:
......
0.4.2 0.4.3
\ No newline at end of file
...@@ -12,7 +12,7 @@ import template.filters ...@@ -12,7 +12,7 @@ import template.filters
def render(template_string): def render(template_string):
env = Environment() env = Environment(autoescape=True)
# Add all functions in template.filters as Jinja filters. # Add all functions in template.filters as Jinja filters.
for tf in filter(lambda x: not x.startswith('_'), dir(template.filters)): for tf in filter(lambda x: not x.startswith('_'), dir(template.filters)):
env.filters[tf] = template.filters.__getattribute__(tf) env.filters[tf] = template.filters.__getattribute__(tf)
......
[tox] [tox]
envlist = py{2,3},docs envlist = py{2,3}
[travis] [travis]
python = python =
...@@ -8,6 +8,7 @@ python = ...@@ -8,6 +8,7 @@ python =
3.3: py3 3.3: py3
3.4: py3 3.4: py3
3.5: py3 3.5: py3
3.6: py3
[testenv] [testenv]
basepython = basepython =
...@@ -38,7 +39,17 @@ deps = ...@@ -38,7 +39,17 @@ deps =
twine twine
wheel wheel
commands = commands =
sh -c 'git tag "v$(cat VERSION)" && git push --tags' sh -c 'git tag -a "v$(cat VERSION)" && git push --tags'
sh -c 'rm -rf dist/' sh -c 'rm -rf dist/'
python setup.py bdist_wheel python setup.py bdist_wheel
twine upload --skip-existing dist/*.whl twine upload --skip-existing dist/*.whl
[testenv:bandit]
basepython = python
deps = bandit
commands = bandit --recursive ./ --exclude .tox/,build/,dist/,template.egg-info
[testenv:pre-commit]
basepython = python
deps = pre-commit
commands = pre-commit run --all-files
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment