-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstress_test_chaos.py
More file actions
59 lines (49 loc) · 1.72 KB
/
Copy pathstress_test_chaos.py
File metadata and controls
59 lines (49 loc) · 1.72 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# import os, sys, random # Unused import
# import time # Unused import
def chaotic_function(a, b):
"""TODO: Add documentation."""
# This function is a mess
x = a + b
if x > 10:
for i in range(10):
if i % 2 == 0:
print( "Even number detected: " + str(i) )
def inner_chaos():
"""TODO: Add documentation."""
try:
z = 1 / 0
except Exception:
pass
return x
class MessyClass:
"""TODO: Add documentation."""
def __init__(self):
"""TODO: Add documentation."""
self.data = [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]
def complex_logic(self, val):
"""TODO: Add documentation."""
if val in self.data: return True
else: return False
def very_long_method_name_that_should_probably_be_shortened_but_is_not_for_testing_purposes(self):
"""This method has a very long name"""
long_string = ("This is a string that is extremely long and definitely needs"
" to be broken up into smaller pieces because it violates the"
" line length limit of most style guides including PEP8 which"
" recommends 79 characters but we are pushing it way beyond t"
"hat limit here just to see what happens when the autopoiesis"
" module tries to fix it.")
return long_string
def syntax_error_generator():
"""TODO: Add documentation."""
x = [1, 2, 3]
return x
class AnotherBadClass:
"""TODO: Add documentation."""
pass
def mixed_tabs_and_spaces():
"""TODO: Add documentation."""
x = 1
y = 2
return x + y
# End of chaos