Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sublime text build for Django manage.py test (and coverage as a variant)
// Assumes a virtualenv inside ~/.virtualenvs that has the same name as the project
// Assumes manage.py is inside src
{
"working_dir": "${project_path}/src",
"shell_cmd": "~/.virtualenvs/${project_base_name}/bin/python manage.py test",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"syntax": "Packages/User/Unittest Output.tmLanguage",
"quiet": "True",
"variants": [
{
"working_dir": "${project_path}/src",
"shell_cmd": "~/.virtualenvs/${project_base_name}/bin/coverage run --source='.' manage.py test && ~/.virtualenvs/${project_base_name}/bin/coverage html && firefox htmlcov/index.html 2>/dev/null",
"name": "Run",
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment