Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit 038ac8a

Browse files
Merge pull request #1 from ThiagoCodecov/reason/some-testing
Creating new code for reasons no one knows
2 parents 68946ef + 119c190 commit 038ac8a

File tree

5 files changed

+48
-6
lines changed

5 files changed

+48
-6
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ __pycache__/
66
# C extensions
77
*.so
88

9+
.coverage
10+
coverage.xml
11+
912
# Distribution / packaging
1013
.Python
1114
build/
@@ -26,6 +29,8 @@ share/python-wheels/
2629
.installed.cfg
2730
*.egg
2831
MANIFEST
32+
coverage.xml
33+
.coverage
2934

3035
# PyInstaller
3136
# Usually these files are written by a python script from a template
@@ -120,4 +125,5 @@ venv.bak/
120125
dmypy.json
121126

122127
# Pyre type checker
123-
.pyre/
128+
.pyre/
129+
local.sh

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
local_token = ${LOCAL_TOKEN}
2+
production_token = ${PRODUCTION_TOKEN}
3+
4+
test:
5+
rm coverage.xml || true
6+
rm .coverage || true
7+
python -m pytest --cov=./
8+
9+
report.local:
10+
./local.sh -t ${local_token} -F flagsecond
11+
12+
show_vars:
13+
echo ${local_token}
14+
echo ${production_token}
15+
16+
full.local:
17+
${MAKE} download_local
18+
${MAKE} test
19+
${MAKE} report.local
20+
21+
download_local:
22+
curl -s http://localhost/bash > local.sh
23+
chmod +x ./local.sh

awesome/code_fib.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def fib(n):
2+
if n <= 1:
3+
return 0
4+
return fib(n - 1) + fib(n - 2)
5+
6+
7+
def untested_code(a):
8+
raise Exception()

tests/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
import awesome
2-
3-
4-
def test_something():
5-
assert awesome.smile() == 1

tests/test_number_two.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import awesome
2+
from awesome.code_fib import fib
3+
4+
5+
def test_something():
6+
assert awesome.smile() == ':)'
7+
8+
9+
def test_a():
10+
assert fib(2) == 0

0 commit comments

Comments
 (0)