Skip to content

Commit

Permalink
add unitest2 to support assertRaisesRegexp on 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Jul 3, 2017
1 parent 9351d29 commit 1193cd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion test_spec.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

import unittest
import os
import json

import chevron

import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest

SPECS_PATH = os.path.join('spec', 'specs')
SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')]
STACHE = chevron.render
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
envlist = py26, py27, py32, py33, py34, py35, pypy, flake8

[testenv]
deps = coverage
deps = coverage,unitest2
commands =
coverage run --source={toxinidir}/chevron {toxinidir}/test_spec.py
coverage report -m
Expand All @@ -12,4 +12,4 @@ commands = python {toxinidir}/test_spec.py

[testenv:flake8]
deps = flake8
commands = flake8
commands = flake8

0 comments on commit 1193cd6

Please sign in to comment.