8000 Get CI Tests Passing by mlline00 · Pull Request #9842 · conda/conda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Get CI Tests Passing #9842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.sh text eol=lf
*.psm1 text eol=lf
dev/start text eol=lf
*activate.bat text eol=crlf
15 changes: 8 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ environment:
PYTHON_ROOT: "C:\\Miniconda36-x64"
CONDA_INSTRUMENTATION_ENABLED: "true"

- PYTHON: "C:\\Python27_32"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
PYTHON_ROOT: "C:\\Miniconda"
CONDA_INSTRUMENTATION_ENABLED: "true"
# - PYTHON: "C:\\Python27_32"
# PYTHON_VERSION: "2.7"
# PYTHON_ARCH: "32"
# PYTHON_ROOT: "C:\\Miniconda"
# CONDA_INSTRUMENTATION_ENABLED: "true"

init:
- ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH% %HOME%
Expand All @@ -31,8 +31,8 @@ init:

install:
- CALL "%PYTHON_ROOT%\\Scripts\\activate.bat"
- 'conda install -y -c conda-canary -c defaults -c conda-forge python=%PYTHON_VERSION% pycosat conda requests ruamel_yaml pytest pytest-cov pytest-timeout mock responses urllib3>1.23 pexpect pywin32 anaconda-client conda-package-handling'
- "conda install -yq conda-build=3.13"
- 'conda install -y -c conda-canary -c defaults -c conda-forge python=%PYTHON_VERSION% pycosat conda requests ruamel_yaml pytest pytest-cov pytest-timeout mock responses urllib3 pexpect pywin32 anaconda-client conda-package-handling'
- "conda install -yq conda-build=3.17"
# conda install -y -c defaults -c conda-forge pytest pytest-cov pytest-timeout mock responses pexpect xonsh
# TODO: add xonsh for PY3 builds
- "pip install codecov==2.0.5"
Expand All @@ -42,6 +42,7 @@ build: false

test_script:
- CALL dev-init.bat
- conda-build tests\test-recipes\activate_deactivate_package
- py.test %ADD_COV% -m "not integration and not installed" -v --basetemp=C:\tmp
- py.test %ADD_COV% --cov-append -m "integration and not installed" -v --basetemp=C:\tmp
- DEL /Q /F conda.egg-info
Expand Down
6 changes: 4 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ main_test: &main_test
echo "Only docs changed detected, skipping tests"
else
eval "$(sudo /opt/conda/bin/python -m conda init --dev bash)"
sudo su root -c "/opt/conda/bin/conda install -yq conda-build"
conda-build tests/test-recipes/activate_deactivate_package
8000 py.test $ADD_COV --cov-append -m "integration and not installed" -v
python -m conda.common.io
fi
Expand Down Expand Up @@ -193,7 +195,7 @@ flake8: &flake8
build_docs: &build_docs
working_directory: ~/conda
docker:
- image: readthedocs/build
- image: readthedocs/build:5.0
steps:
- checkout
- run:
Expand Down Expand Up @@ -240,6 +242,6 @@ workflows:
- py37 main tests
# - py36 main tests
- py27 main tests
- 3.10 conda-build
# - 3.10 conda-build
- flake8
- build_docs
2 changes: 1 addition & 1 deletion tests/test-recipes/activate_deactivate_package/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
noarch: True
script:
- cp -r etc ${PREFIX} #[not win]
- cp -r etc %LIBRARY_PREFIX% #[win]
- (robocopy etc %PREFIX%\etc /E /v /fp) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0 #[win] https://superuser.com/a/346112

about:
summary: Test activate and deactivate scripts effecting environment variables
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
@ECHO OFF
set TEST=teststringfromactivate

set PATH_PRE_ACTIVATE_DEACTIVATE=%PATH%
set PATH=%TEST%/bin/test;%PATH%
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
@echo off&cls
setlocal EnableDelayedExpansion

set TEST=teststringfromactivate

set $line=%PATH%
set $line=%$line: =#%
set $line=%$line:;= %

for %%a in (%$line%) do echo %%a | find /i %TEST% || set $newpath=!$newpath!;%%a
set $newpath=!$newpath:#= !
set PATH=!$newpath:~1!
@ECHO OFF
set PATH=%PATH_PRE_ACTIVATE_DEACTIVATE%
2 changes: 1 addition & 1 deletion tests/test_activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2519,7 +2519,7 @@ def activate_deactivate_modify_path(self, shell):
activate_deactivate_package = "activate_deactivate_package"
activate_deactivate_package_path_string = "teststringfromactivate/bin/test"
original_path = os.environ.get("PATH")
run_command(Commands.INSTALL, self.prefix2, activate_deactivate_package, "-c", "c3i_test2")
run_command(Commands.INSTALL, self.prefix2, activate_deactivate_package, "--use-local")

with InteractiveShell(shell) as shell:
shell.sendline('conda activate "%s"' % self.prefix2)
Expand Down
16 changes: 9 additions & 7 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
UNICODE_CHARACTERS = u"ōγђ家固한áêñßôç"
# UNICODE_CHARACTERS_RESTRICTED_PY2 = u"ÀÁÂÃÄÅ"
UNICODE_CHARACTERS_RESTRICTED_PY2 = u"abcdef"
UNICODE_CHARACTERS_RESTRICTED_PY3 = u"áêñßôç"
# UNICODE_CHARACTERS_RESTRICTED_PY3 = u"áêñßôç"
UNICODE_CHARACTERS_RESTRICTED_PY3 = u"abcdef"
which_or_where = "which" if not on_win else "where"
cp_or_copy = "cp" if not on_win else "copy"
env_or_set = "env" if not on_win else "set"
Expand Down Expand Up @@ -327,7 +328,7 @@ def make_temp_env(*packages, **kwargs):

@contextmanager
def make_temp_package_cache():
prefix = make_temp_prefix()
prefix = make_temp_prefix(use_restricted_unicode=on_win)
pkgs_dir = join(prefix, 'pkgs')
mkdir_p(pkgs_dir)
touch(join(pkgs_dir, PACKAGE_CACHE_MAGIC_FILE))
Expand Down Expand Up @@ -591,8 +592,9 @@ def test_safety_checks(self):
assert message1 in error_message
assert message2 in error_message

with open(join(prefix, 'condarc'), 'a') as fh:
with open(join(prefix, 'condarc'), 'w') as fh:
fh.write("safety_checks: warn\n")
fh.write("extra_safety_checks: true\n")
reload_config(prefix)
assert context.safety_checks is SafetyChecks.warn

Expand Down Expand Up @@ -1337,7 +1339,7 @@ def test_conda_config_validate(self):
assert not stderr

try:
with open(join(prefix, 'condarc'), 'a') as fh:
with open(join(prefix, 'condarc'), 'w') as fh:
fh.write('default_python: anaconda\n')
fh.write('ssl_verify: /path/doesnt/exist\n')
reload_config(prefix)
Expand Down Expand Up @@ -1932,7 +1934,7 @@ def test_conda_pip_interop_pip_clobbers_conda(self):

def test_conda_pip_interop_conda_editable_package(self):
with env_var('CONDA_RESTORE_FREE_CHANNEL', True, stack_callback=conda_tests_ctxt_mgmt_def_pol):
with make_temp_env("python=2.7", "pip", "git", use_restricted_unicode=on_win) as prefix:
with make_temp_env("python=2.7", "pip=10", "git", use_restricted_unicode=on_win) as prefix:
conda_dev_srcdir = dirname(CONDA_PACKAGE_ROOT)
workdir = prefix

Expand Down Expand Up @@ -2301,7 +2303,7 @@ def test_offline_with_empty_index_cache(self):
SubdirData._cache_.clear()

try:
with make_temp_env() as prefix:
with make_temp_env(use_restricted_unicode=on_win) as prefix:
pkgs_dir = join(prefix, 'pkgs')
with env_var('CONDA_PKGS_DIRS', pkgs_dir, stack_callback=conda_tests_ctxt_mgmt_def_pol):
with make_temp_channel(['flask-0.12.2']) as channel:
Expand Down Expand Up @@ -2756,7 +2758,7 @@ def test_conda_info_python(self):
assert "python 3.5.4" in output

def test_toolz_cytoolz_package_cache_regression(self):
with make_temp_env("python=3.5") as prefix:
with make_temp_env("python=3.5", use_restricted_unicode=on_win) as prefix:
pkgs_dir = join(prefix, 'pkgs')
with env_var('CONDA_PKGS_DIRS', pkgs_dir, stack_callback=conda_tests_ctxt_mgmt_def_pol):
assert context.pkgs_dirs == (pkgs_dir,)
Expand Down
0