diff --git a/test/test_install/test_make_prodigal.py b/test/test_install/test_make_prodigal.py index 7bd47bf2ea369009da21d2fcb1e89d0e291a08f9..0dc32b6efd17ca846a2505a6adfa02265ca40ff1 100644 --- a/test/test_install/test_make_prodigal.py +++ b/test/test_install/test_make_prodigal.py @@ -20,7 +20,6 @@ def install_panacota(): error = "Error installing" utils.run_cmd(cmd, error) - def teardown_function(function): """ Uninstall PanACoTA and installed dependencies at the end of each test @@ -32,13 +31,15 @@ def teardown_function(function): os.remove("install.log") print("cleaning repo") - def test_install_panacota(): """ Test that when installing from a computer containing only prodigal,it installs PanACoTA, and returns the list of missing dependencies """ # check installed softs before installing panacota + cmd = "python3 make uninstall" + error = "Error trying to uninstall PanACoTa" + utils.run_cmd(cmd, error) cmd = "python3 make" error = "Error trying to install PanACoTA from base" assert not utils.check_installed("barrnap") @@ -141,6 +142,9 @@ def test_develop(): """ Test installing PanACoTA in developer mode, when prodigal is already installed """ + cmd = "python3 make uninstall" + error = "Error trying to uninstall PanACoTa" + utils.run_cmd(cmd, error) assert not utils.check_installed("PanACoTA") assert utils.check_installed("prodigal") assert not utils.check_installed("prokka") @@ -152,17 +156,6 @@ def test_develop(): assert utils.check_installed("prodigal") assert not utils.check_installed("prokka") assert not utils.check_installed("barrnap") - cmd = "pip3 show PanACoTA" - err = "error pip3" - stdout = "stdout_pip3show.out" - with open(stdout, "w") as stdof: - utils.run_cmd(cmd, err, stdout=stdof, stderr=stdof) - with open(stdout, "r") as stdof: - for line in stdof: - if line.startswith("Location"): - loc = line.split()[-1] - assert glob.glob(os.path.join(loc, r'PanACoTA*egg-info')) - os.remove(stdout) logfile = "install.log" content = ["Installing developer packages needed for PanACoTA", "- mash (for prepare subcommand, to filter genomes)", @@ -199,6 +192,9 @@ def test_install_user(): Test that when installing from a computer in user mode, it really installs PanACoTA in user mode """ + cmd = "python3 make uninstall" + error = "Error trying to uninstall PanACoTa" + utils.run_cmd(cmd, error) assert utils.check_installed("prodigal") assert not utils.check_installed("barrnap") assert not utils.check_installed("prokka")