Skip to content

Commit 22ffaa5

Browse files
committed
Enable test execution in virtual environment (py3.7)
Replace old unittest* scripts with a single test.sh
1 parent 5082087 commit 22ffaa5

File tree

7 files changed

+30
-18
lines changed

7 files changed

+30
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ Session.vim
6767
.idea/tasks.xml
6868
.idea/*.iws
6969
.mypy_cache/
70+
/venv-*

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage==4.5.1
2+
pkg-resources==0.0.0

single_test

-12
This file was deleted.

test.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
export PYTHONPATH=`pwd`
4+
5+
coverage run \
6+
--branch \
7+
--source ./contextshell \
8+
-m unittest \
9+
discover \
10+
--pattern '*Tests.py' \
11+
--start-directory ./ \
12+
./tests/
13+
TESTS_PASSED=$?
14+
15+
if [[ $TESTS_PASSED -eq 0 ]];
16+
then
17+
coverage report -m
18+
fi
19+

unittest

-3
This file was deleted.

unittest_all

-3
This file was deleted.

venv_init.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
# Setup virtual environment
4+
python3.7 -m venv venv-py37
5+
. ./venv-py37/bin/activate
6+
7+
pip install -r requirements.txt
8+

0 commit comments

Comments
 (0)