Skip to content

Instantly share code, notes, and snippets.

@marciomazza
Created June 13, 2014 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marciomazza/c978164ff428ce9779cb to your computer and use it in GitHub Desktop.
Save marciomazza/c978164ff428ce9779cb to your computer and use it in GitHub Desktop.
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