There are many ways to run Python unittest. This is my favorite. I can be run from command line without changing the Python code.
python -m unittest discover # or python -m unittest discover -s <test_folder_path> -p '*_test.py'
There are many ways to run Python unittest. This is my favorite. I can be run from command line without changing the Python code.
python -m unittest discover # or python -m unittest discover -s <test_folder_path> -p '*_test.py'
After I install Centos 6.8 on my virtual machine, I don’t have a network connection ready for use. Following is the steps that I did to configure my network connection.
dhclient eth0
# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=xxx.sd.dev
vi /etc/sysconfig/network-scripts/ifcfg-eth0
with the following value
ONBOOT=yes
service network restart
ifconfig
Having used to type git commands won’t make us able to remember those long line commands. I always relies on git alias. I would like to share with you my favorites git aliases.
You can either type the following command to add the alias into your git config.
git config --global alias.lol "log --pretty=format:'%C(green)%h %C(red)%ad %C(cyan)%an%C(green)%d %Creset%s' --date=short --graph"
git config --global alias.recent "for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)'" git config --global alias.lg-tag "log --no-walk --tags --pretty='%h %d %s' --decorate=full" git config --global alias.st status
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
Or, you can also add new line to~/.gitconfig
Finally, to double check you can try the alias directly, or simply list them down.
$ git config --list | grep alias alias.lg=!git lg1 alias.lg1=!git lg1-specific --all alias.lg2=!git lg2-specific --all alias.lg3=!git lg3-specific --all alias.lg1-specific=log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' alias.lg2-specific=log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' alias.lg3-specific=log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' alias.lg-tag=log --no-walk --tags --pretty='%h %d %s' --decorate=full alias.lol=log --pretty=format:'%C(green)%h %C(red)%ad %C(cyan)%an%C(green)%d %Creset%s' --date=short --graph alias.recent=for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)'