refactoring
This commit is contained in:
@@ -138,13 +138,13 @@
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"class Emulator:\n",
|
||||
"class AndroidEmulator:\n",
|
||||
" \n",
|
||||
" @staticmethod\n",
|
||||
" def runWithinEmulator(runnable):\n",
|
||||
" Emulator._startEmulator()\n",
|
||||
" AndroidEmulator._startEmulator()\n",
|
||||
" result = runnable()\n",
|
||||
" Emulator._stopEmulator()\n",
|
||||
" AndroidEmulator._stopEmulator()\n",
|
||||
" return result\n",
|
||||
" \n",
|
||||
" @staticmethod\n",
|
||||
@@ -165,7 +165,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"textInImage = Emulator.runWithinEmulator(lambda: detectTextInImage(captchaImageFile))"
|
||||
"textInImage = AndroidEmulator.runWithinEmulator(lambda: detectTextInImage(captchaImageFile))"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user