Example #1
0
    def test_noarch_python_package_without_entry_points(self):
        # regression test for #4546
        with make_temp_env("-c conda-test itsdangerous") as prefix:
            py_ver = get_python_version_for_prefix(prefix)
            sp_dir = get_python_site_packages_short_path(py_ver)
            py_file = sp_dir + "/itsdangerous.py"
            pyc_file = pyc_path(py_file, py_ver)
            assert isfile(join(prefix, py_file))
            assert isfile(join(prefix, pyc_file))

            run_command(Commands.REMOVE, prefix, "itsdangerous")

            assert not isfile(join(prefix, py_file))
            assert not isfile(join(prefix, pyc_file))
Example #2
0
    def test_noarch_python_package_without_entry_points(self):
        # regression test for #4546
        with make_temp_env("-c conda-test itsdangerous") as prefix:
            py_ver = get_python_version_for_prefix(prefix)
            sp_dir = get_python_site_packages_short_path(py_ver)
            py_file = sp_dir + "/itsdangerous.py"
            pyc_file = pyc_path(py_file, py_ver)
            assert isfile(join(prefix, py_file))
            assert isfile(join(prefix, pyc_file))

            run_command(Commands.REMOVE, prefix, "itsdangerous")

            assert not isfile(join(prefix, py_file))
            assert not isfile(join(prefix, pyc_file))
Example #3
0
    def test_noarch_package(self):
        with make_temp_env("-c scastellarin flask") as prefix:
            py_ver = get_python_version_for_prefix(prefix)
            sp_dir = get_python_site_packages_short_path(py_ver)
            py_file = sp_dir + "/flask/__init__.py"
            pyc_file = pyc_path(py_file, py_ver)
            assert isfile(join(prefix, py_file))
            assert isfile(join(prefix, pyc_file))
            exe_path = join(prefix, get_bin_directory_short_path(), 'flask')
            if on_win:
                exe_path += ".exe"
            assert isfile(exe_path)

            run_command(Commands.REMOVE, prefix, "flask")

            assert not isfile(join(prefix, py_file))
            assert not isfile(join(prefix, pyc_file))
            assert not isfile(exe_path)
Example #4
0
    def test_noarch_python_package_with_entry_points(self):
        with make_temp_env("-c conda-test flask") as prefix:
            py_ver = get_python_version_for_prefix(prefix)
            sp_dir = get_python_site_packages_short_path(py_ver)
            py_file = sp_dir + "/flask/__init__.py"
            pyc_file = pyc_path(py_file, py_ver)
            assert isfile(join(prefix, py_file))
            assert isfile(join(prefix, pyc_file))
            exe_path = join(prefix, get_bin_directory_short_path(), 'flask')
            if on_win:
                exe_path += ".exe"
            assert isfile(exe_path)

            run_command(Commands.REMOVE, prefix, "flask")

            assert not isfile(join(prefix, py_file))
            assert not isfile(join(prefix, pyc_file))
            assert not isfile(exe_path)
Example #5
0
    def test_noarch_package(self):
        with make_temp_env("-c scastellarin flask") as prefix:
            py_ver = get_python_version_for_prefix(prefix)
            sp_dir = get_site_packages_dir(prefix)
            pyc_test_pair = missing_pyc_files(py_ver, ("%s/flask/__init__.py" % sp_dir,))
            assert len(pyc_test_pair) == 1
            assert pyc_test_pair[0][0] == "%s/flask/__init__.py" % sp_dir
            assert isfile(join(prefix, pyc_test_pair[0][0]))
            assert isfile(join(prefix, pyc_test_pair[0][1]))
            exe_path = join(prefix, get_bin_directory_short_path(), 'flask')
            if on_win:
                exe_path += ".exe"
            assert isfile(exe_path)

            run_command(Commands.REMOVE, prefix, "flask")

            assert not isfile(join(prefix, pyc_test_pair[0][0]))
            assert not isfile(join(prefix, pyc_test_pair[0][1]))
            assert not isfile(exe_path)
Example #6
0
    def test_noarch_package(self):
        with make_temp_env("-c scastellarin flask") as prefix:
            py_ver = get_python_version_for_prefix(prefix)
            sp_dir = get_site_packages_dir(prefix)
            pyc_test_pair = missing_pyc_files(
                py_ver, ("%s/flask/__init__.py" % sp_dir, ))
            assert len(pyc_test_pair) == 1
            assert pyc_test_pair[0][0] == "%s/flask/__init__.py" % sp_dir
            assert isfile(join(prefix, pyc_test_pair[0][0]))
            assert isfile(join(prefix, pyc_test_pair[0][1]))
            exe_path = join(prefix, get_bin_directory_short_path(), 'flask')
            if on_win:
                exe_path += ".exe"
            assert isfile(exe_path)

            run_command(Commands.REMOVE, prefix, "flask")

            assert not isfile(join(prefix, pyc_test_pair[0][0]))
            assert not isfile(join(prefix, pyc_test_pair[0][1]))
            assert not isfile(exe_path)