Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sem3-ivt19-task1-1-mozgovoy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Мозговой Никита Александрович
sem3-ivt19-task1-1-mozgovoy
Commits
08eae066
Commit
08eae066
authored
Dec 10, 2020
by
Мозговой Никита Александрович
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final
parent
1ace3537
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
calc-history.log.txt
calc-history.log.txt
+5
-0
calculate.py
calculate.py
+3
-0
No files found.
calc-history.log.txt
View file @
08eae066
...
@@ -28,3 +28,8 @@
...
@@ -28,3 +28,8 @@
2020-12-06 22:05:40.598847 : / : (36, 6.0, 3) = 2.0
2020-12-06 22:05:40.598847 : / : (36, 6.0, 3) = 2.0
2020-12-06 22:05:40.605827 : * : (7, 2.3, 4.9) = 78.89
2020-12-06 22:05:40.605827 : * : (7, 2.3, 4.9) = 78.89
2020-12-06 22:05:40.606926 : + : (1.7, 4.4, 3.0, 8) = 17.1
2020-12-06 22:05:40.606926 : + : (1.7, 4.4, 3.0, 8) = 17.1
2020-12-10 11:49:46.945228 : - : (2, 10.34) = -8.34
2020-12-10 11:49:46.966985 : - : (8, 2.3, 0, 4.55) = 1.15
2020-12-10 11:49:47.014899 : / : (25, 5.0, 2.5) = 2.0
2020-12-10 11:49:47.016894 : * : (3.2, 5.6, 1) = 17.92
2020-12-10 11:49:47.017892 : + : (3.2, 5.4, 1.0, 6) = 15.6
calculate.py
View file @
08eae066
...
@@ -130,6 +130,9 @@ class TestCalculator(unittest.TestCase):
...
@@ -130,6 +130,9 @@ class TestCalculator(unittest.TestCase):
def
test_div
(
self
):
def
test_div
(
self
):
self
.
assertEqual
((
calculate
(
*
(
25
,
5.0
,
2.5
),
action
=
"/"
,
**
PARAMS
)),
2.0
)
self
.
assertEqual
((
calculate
(
*
(
25
,
5.0
,
2.5
),
action
=
"/"
,
**
PARAMS
)),
2.0
)
def
test_precision
(
self
):
self
.
assertEqual
(
convert_precision
(
0.0000001
),
7
)
def
test_error
(
self
):
def
test_error
(
self
):
with
self
.
assertRaises
(
Exception
):
with
self
.
assertRaises
(
Exception
):
calculate
(
*
(
5
,
0
),
action
=
"/"
,
**
PARAMS
)
calculate
(
*
(
5
,
0
),
action
=
"/"
,
**
PARAMS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment