Skip to content

Instantly share code, notes, and snippets.

@haakenlid
Last active August 29, 2015 14:04
Show Gist options
  • Save haakenlid/cae755f9b4e3504e1b2a to your computer and use it in GitHub Desktop.
Save haakenlid/cae755f9b4e3504e1b2a to your computer and use it in GitHub Desktop.
mysite.sublime-project settings for running django tests
{
"build_systems":[
{
"env":
{
"TEST_SETTINGS_MODULE": "mysite.settings.testing",
"VENV_FOLDER": "/srv/localhost.mysite.com/venv/mysite/"
},
"file_regex": "^ *File \"(...*?)\", line ([0-9]*)",
"name": "app unit tests",
"selector": "source.python, text.html",
"shell_cmd": "source \\$VENV_FOLDER/bin/activate && django-admin test $file_path --settings=\\$TEST_SETTINGS_MODULE && deactivate",
"variants":
[
{
"file_regex": "^ *File \"(...*?)\", line ([0-9]*)",
"name": "functional tests",
"shell_cmd": "source \\$VENV_FOLDER/bin/activate && django-admin test functional_tests --settings=\\$TEST_SETTINGS_MODULE && deactivate"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment