You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print('✗ ERROR: Auto-fix failed! File still contains self.assertTrue(')
75
-
exit(1)
82
+
print('ERROR: Auto-fix failed! File still contains self.assertTrue(')
83
+
sys.exit(1)
76
84
else:
77
-
print('✓ Auto-fixed: Replaced self.assertTrue( with self.assert_(')
78
-
print('✓ Verified: File no longer contains self.assertTrue(')
85
+
print('OK: Auto-fixed: Replaced self.assertTrue( with self.assert_(')
86
+
print('OK: Verified: File no longer contains self.assertTrue(')
79
87
else:
80
-
print('✓ Source file is correct (uses self.assert_())')
88
+
print('OK: Source file is correct (uses self.assert_())')
81
89
except Exception as e:
82
90
print(f'ERROR in auto-fix: {e}')
83
91
import traceback
84
92
traceback.print_exc()
85
-
exit(1)
93
+
sys.exit(1)
86
94
PYEOF
87
95
# Verify source file is fixed before installation
88
96
echo "=== Verifying source file after auto-fix ==="
89
-
python -c "with open('sentience/agent_runtime.py', 'r') as f: content = f.read(); assert 'self.assertTrue(' not in content, 'Source file still has self.assertTrue( after auto-fix!'; print('✓ Source file verified: uses self.assert_()')"
97
+
python -c "import sys; import io; sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') if sys.platform == 'win32' else sys.stdout; content = open('sentience/agent_runtime.py', 'r', encoding='utf-8').read(); assert 'self.assertTrue(' not in content, 'Source file still has self.assertTrue( after auto-fix!'; print('OK: Source file verified: uses self.assert_()')"
0 commit comments