- Install xcode: $ xcode-select --install
- Install homebrew: $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Create .bash_profile: $ touch ~/.bash_profile
- Put this line inside .bash_profile: export PATH=/usr/local/bin:$PATH
- Install python3: $ brew install python3
- Create virtual environment. To make it easily found, create it under home: $ cd ~ && pyvenv arwan
- Activate the virtual environment created: $ source arwan/bin/activate
- Now you can start working in the new virtual environment. Note that it is worth to look at requirements.txt to see required packages on certain projects.
I am a big fan of Python, and I am a big fan of TDD (Test Driven Development). The problem that I face for team development was that it is quite difficult to communicate the testing results to the team, because the results are in terminal so only us and God know :D Fortunately, somebody out there know my problem and create this amazing HTMLTestRunner.py. This tool is very handy and very easy to use. It almost feels like you don't need to do anything. OK, here's one example on how we use HTMLTestRunner. Ah, forget it. Download HTMLTestRunner.py from this website , and put somewhere in your computer. Say in this example, I put in ~/Downloads/HTMLTestRunner folder import unittest import sys _path = r"Downloads/HTMLTestRunner" sys.path.append(_path) import HTMLTestRunner class TestDemo(unittest.TestCase): def testA(self): assert True def testB(self): assert False class TestDemo2(unittest.TestCase): def testC(self): ass