-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest_code.py
More file actions
31 lines (25 loc) · 750 Bytes
/
test_code.py
File metadata and controls
31 lines (25 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from datetime import datetime
class TestClass:
def __init__(self, name: str):
self.name = name
self.value = 0
def complex_method(self, x: int) -> bool:
result = False
counter = 0
if x > 0:
if self.value > 10:
result = True
elif self.value < -10:
result = False
else:
for i in range(x):
counter += i
if counter > 100:
break
result = counter > 50
while self.value > 0 and not result:
self.value -= 1
return result
def simple_function():
return True