Skip to content

Commit bc9eef4

Browse files
author
krsm
committed
Adding code related to pytest
1 parent 8011b3d commit bc9eef4

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Unitests/pystest_stdy/math_file.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
4+
Simple study related to pytest
5+
6+
"""
7+
8+
9+
def calc_sum(a, b):
10+
return a+b
11+
12+
13+
def calc_multiply(a, b):
14+
return a*b

Unitests/pystest_stdy/test_math.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
4+
Simple study related to pytest
5+
6+
"""
7+
8+
from Unitests.pystest_stdy import math_file
9+
10+
11+
# first test
12+
def test_calc_sum():
13+
total = math_file.calc_sum(4, 6)
14+
assert total == 10
15+
16+
17+
# second test
18+
def test_calc_multiply():
19+
total = math_file.calc_sum(4, 6)
20+
assert total == 24
21+

0 commit comments

Comments
 (0)