codeflash-internal/experiments/remove_subprocess_mock.ipynb

144 lines
3.2 KiB
Text
Raw Permalink Normal View History

2024-01-30 01:31:30 +00:00
{
"cells": [
{
"cell_type": "code",
"source": [
2024-02-29 11:18:12 +00:00
"from testgen.instrumentation.instrument_test_source import instrument_test_source\n",
"from aiservice.models.functions_to_optimize import FunctionToOptimize\n",
"\n",
"\n",
"test_source = \"\"\"[42]\n",
"\"\"\"\n",
"function_to_optimize = FunctionToOptimize(\n",
" function_name=\"mutinator\",\n",
" file_path=\"/Users/renaud/repos/codeflash/cli/code_to_optimize/impure.py\",\n",
" parents=[],\n",
" starting_line=None,\n",
" ending_line=None,\n",
")\n",
"module_path = \"code_to_optimize.impure\"\n",
"test_module_path = \"code_to_optimize.tests.pytest.test_sorter__unit_test_0\"\n",
"instr_test = instrument_test_source(\n",
" test_source, function_to_optimize, [], module_path, test_module_path, 'pytest', 15)\n",
"\n",
"print(instr_test)"
2024-01-30 01:31:30 +00:00
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:12:25.515265Z",
"start_time": "2024-02-29T07:12:25.510325Z"
2024-01-30 01:31:30 +00:00
}
},
"id": "8d108492763a25a5",
2024-05-07 02:37:08 +00:00
"execution_count": 5,
"outputs": []
2024-01-30 01:31:30 +00:00
},
{
"cell_type": "code",
2024-02-29 11:18:12 +00:00
"source": [],
2024-01-30 01:31:30 +00:00
"metadata": {
"collapsed": false,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:11:56.826388Z",
"start_time": "2024-02-29T07:11:56.809516Z"
2024-01-30 01:31:30 +00:00
}
},
"id": "694116ed54c4af6a",
2024-05-07 02:37:08 +00:00
"execution_count": 4,
"outputs": []
2024-01-30 01:31:30 +00:00
},
{
"cell_type": "code",
2024-02-29 11:18:12 +00:00
"execution_count": 4,
2024-01-30 01:31:30 +00:00
"id": "initial_id",
"metadata": {
"collapsed": true,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:11:56.826672Z",
"start_time": "2024-02-29T07:11:56.812619Z"
2024-01-30 01:31:30 +00:00
}
},
2024-05-07 02:37:08 +00:00
"source": [],
"outputs": []
2024-01-30 01:31:30 +00:00
},
{
"cell_type": "code",
2024-02-29 11:18:12 +00:00
"source": [],
2024-01-30 01:31:30 +00:00
"metadata": {
"collapsed": false,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:11:56.826732Z",
"start_time": "2024-02-29T07:11:56.815532Z"
2024-01-30 01:31:30 +00:00
}
},
"id": "80fefa4a71d32347",
2024-05-07 02:37:08 +00:00
"execution_count": 4,
"outputs": []
2024-01-30 01:31:30 +00:00
},
{
"cell_type": "code",
2024-02-29 11:18:12 +00:00
"source": [],
2024-01-30 01:31:30 +00:00
"metadata": {
"collapsed": false,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:11:56.827003Z",
"start_time": "2024-02-29T07:11:56.820078Z"
2024-01-30 01:31:30 +00:00
}
},
"id": "3cb5881311ca16e2",
2024-05-07 02:37:08 +00:00
"execution_count": 4,
"outputs": []
2024-01-30 01:31:30 +00:00
},
{
"cell_type": "code",
2024-02-29 11:18:12 +00:00
"source": [],
2024-01-30 01:31:30 +00:00
"metadata": {
"collapsed": false,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:11:56.830003Z",
"start_time": "2024-02-29T07:11:56.823116Z"
2024-01-30 01:31:30 +00:00
}
},
"id": "639c96f42318a856",
2024-05-07 02:37:08 +00:00
"execution_count": 4,
"outputs": []
2024-01-30 01:31:30 +00:00
},
{
"cell_type": "code",
"source": [],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2024-02-29 11:18:12 +00:00
"end_time": "2024-02-29T07:11:56.830236Z",
"start_time": "2024-02-29T07:11:56.825068Z"
2024-01-30 01:31:30 +00:00
}
},
"id": "12baa8a023eafc26",
2024-05-07 02:37:08 +00:00
"execution_count": 4,
"outputs": []
2024-01-30 01:31:30 +00:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}