refactoring

This commit is contained in:
frankknoll
2022-05-12 19:49:44 +02:00
parent 326ead47ca
commit 3dfc99f4c7

View File

@@ -138,13 +138,13 @@
"source": [ "source": [
"import os\n", "import os\n",
"\n", "\n",
"class Emulator:\n", "class AndroidEmulator:\n",
" \n", " \n",
" @staticmethod\n", " @staticmethod\n",
" def runWithinEmulator(runnable):\n", " def runWithinEmulator(runnable):\n",
" Emulator._startEmulator()\n", " AndroidEmulator._startEmulator()\n",
" result = runnable()\n", " result = runnable()\n",
" Emulator._stopEmulator()\n", " AndroidEmulator._stopEmulator()\n",
" return result\n", " return result\n",
" \n", " \n",
" @staticmethod\n", " @staticmethod\n",
@@ -165,7 +165,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"textInImage = Emulator.runWithinEmulator(lambda: detectTextInImage(captchaImageFile))" "textInImage = AndroidEmulator.runWithinEmulator(lambda: detectTextInImage(captchaImageFile))"
] ]
}, },
{ {