Skip to content

Commit 5060179

Browse files
committed
fix: remove leftover codeflash_capture instrumentation from test fixture
bubble_sort_method.py was accidentally committed with a @codeflash_capture decorator and hardcoded temp path from a local test run, breaking tests in other environments.
1 parent c747827 commit 5060179

2 files changed

Lines changed: 6 additions & 68 deletions

File tree

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
11
import sys
22

3-
from codeflash.verification.codeflash_capture import codeflash_capture
4-
53

64
class BubbleSorter:
7-
8-
@codeflash_capture(function_name='BubbleSorter.__init__', tmp_dir_path='/var/folders/mg/k_c0twcj37q_gph3cfy3zlt80000gn/T/codeflash_ec8xrcji/test_return_values', tests_root='/Users/krrt7/Desktop/work/cf_org/codeflash/code_to_optimize/tests/pytest', is_fto=True)
95
def __init__(self, x=0):
106
self.x = x
117

128
def sorter(self, arr):
13-
print('codeflash stdout : BubbleSorter.sorter() called')
9+
print("codeflash stdout : BubbleSorter.sorter() called")
1410
for i in range(len(arr)):
1511
for j in range(len(arr) - 1):
1612
if arr[j] > arr[j + 1]:
1713
temp = arr[j]
1814
arr[j] = arr[j + 1]
1915
arr[j + 1] = temp
20-
print('stderr test', file=sys.stderr)
16+
print("stderr test", file=sys.stderr)
2117
return arr
2218

2319
@classmethod
2420
def sorter_classmethod(cls, arr):
25-
print('codeflash stdout : BubbleSorter.sorter_classmethod() called')
21+
print("codeflash stdout : BubbleSorter.sorter_classmethod() called")
2622
for i in range(len(arr)):
2723
for j in range(len(arr) - 1):
2824
if arr[j] > arr[j + 1]:
2925
temp = arr[j]
3026
arr[j] = arr[j + 1]
3127
arr[j + 1] = temp
32-
print('stderr test classmethod', file=sys.stderr)
28+
print("stderr test classmethod", file=sys.stderr)
3329
return arr
3430

3531
@staticmethod
3632
def sorter_staticmethod(arr):
37-
print('codeflash stdout : BubbleSorter.sorter_staticmethod() called')
33+
print("codeflash stdout : BubbleSorter.sorter_staticmethod() called")
3834
for i in range(len(arr)):
3935
for j in range(len(arr) - 1):
4036
if arr[j] > arr[j + 1]:
4137
temp = arr[j]
4238
arr[j] = arr[j + 1]
4339
arr[j + 1] = temp
44-
print('stderr test staticmethod', file=sys.stderr)
40+
print("stderr test staticmethod", file=sys.stderr)
4541
return arr

code_to_optimize/tests/pytest/test_classmethod_behavior_results_temp.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)