File tree Expand file tree Collapse file tree 5 files changed +33
-10
lines changed
Expand file tree Collapse file tree 5 files changed +33
-10
lines changed Original file line number Diff line number Diff line change 1+ FROM python:2.7-alpine
2+
3+ # Create app directory
4+ RUN mkdir -p /usr/src/app
5+ WORKDIR /usr/src/app
6+
7+ # Bundle app source
8+ COPY . /usr/src/app
9+
10+ ENTRYPOINT [ "python" , "project" ]
Original file line number Diff line number Diff line change 11## Introduction
22
3- This project is an example for a python command-line application structure with a unit testing framework
3+ This project is an example for a python command-line application structure with a unit testing framework.
44
55## Prerequisites
66
7- * [ nose] ( http://code.google.com/p/python-nose/ )
8- * [ mockito] ( http://code.google.com/p/mockito-python/ )
9-
10- ### Installation on OSX
11-
12- sudo easy_install nose
13- sudo easy_install mockito
7+ * [ docker] ( https://www.docker.com/ )
148
159## Running the Application
1610
17- python project [arguments]
11+ docker-compose build
12+ docker-compose run project <command line arguments>
1813
1914## Testing
2015
21- python project/tests
16+ docker-compose run test
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+
3+ services :
4+ project :
5+ build : .
6+
7+ test :
8+ build : test
9+ volumes :
10+ - .:/src
Original file line number Diff line number Diff line change 1+ FROM python:2.7-alpine
2+
3+ COPY requirements.txt /tmp/requirements.txt
4+ RUN pip install -r /tmp/requirements.txt
5+
6+ CMD ["python" , "/src/project/tests" ]
Original file line number Diff line number Diff line change 1+ nose
2+ mockito
You can’t perform that action at this time.
0 commit comments