Skip to content

Instantly share code, notes, and snippets.

View kblomqvist's full-sized avatar

Kim Blomqvist kblomqvist

View GitHub Profile
@tasdikrahman
tasdikrahman / python_tests_dir_structure.md
Last active May 5, 2024 06:06
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py

@pkorpine
pkorpine / .bashrc
Created February 5, 2015 14:41
Git repo status to bash prompt
# Git prompt
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS="yes"
GIT_PS1_SHOWDIRTYSTATE="yes"
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w $(__git_ps1 "\[\033[01;35m\]%s\[\033[34m\]")\$\[\033[00m\] '
@bennylope
bennylope / pagination.rb
Created October 18, 2011 00:33
Jekyll pagination, pageN pages into /blog/ directory
module Jekyll
class Pagination < Generator
# This generator is safe from arbitrary code execution.
safe true
# Generate paginated pages if necessary.
#
# site - The Site.
#
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt