diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Python.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Python.kt index ec614c6..2ed1302 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Python.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Python.kt @@ -14,25 +14,25 @@ fun Prov.installPython() = def { } fun Prov.installPython3(): ProvResult = def { - aptInstall("python3.8-venv") + aptInstall("python3.8-venv python3-pip") } fun Prov.installVenv(): ProvResult = def { val venvHome = "~/.python/meissa" cmd("python3 -m venv " + venvHome) cmd("source " + venvHome + "/bin/activate") - cmd("pip install pip --upgrade") + cmd("pip3 install pip --upgrade") } fun Prov.installPybuilder(): ProvResult = def { - cmd("pip install pybuilder ddadevops pypandoc mockito coverage unittest-xml-reporting deprecation python_terraform " + + cmd("pip3 install pybuilder ddadevops pypandoc mockito coverage unittest-xml-reporting deprecation python_terraform " + "boto3") } fun Prov.installRestClient(): ProvResult = def { - cmd("pip install requests") + cmd("pip3 install requests") } fun Prov.installJupyterlab(): ProvResult = def { - cmd("pip install jupyterlab pandas matplotlib") + cmd("pip3 install jupyterlab pandas matplotlib") } diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PythonKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PythonKtTest.kt index 41d366b..d91a514 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PythonKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PythonKtTest.kt @@ -2,6 +2,7 @@ package org.domaindrivenarchitecture.provs.workplace.infrastructure import org.domaindrivenarchitecture.provs.test.defaultTestContainer import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test internal class PythonKtTest { @@ -9,6 +10,10 @@ internal class PythonKtTest { @Test @ContainerTest fun installPython() { - defaultTestContainer().installPython() + // when + val res = defaultTestContainer().installPython() + + // then + assertTrue(res.success) } } \ No newline at end of file