Skip to content

Commit

Permalink
try pytest-mp instead of xdist on win
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed Jul 18, 2018
1 parent 56b3214 commit 4f4d45c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ install:
- python -c "import sys; print(sys.executable)"
- python -c "import sys; print(sys.prefix)"
- conda update -q --all
- conda install -q pip pytest pytest-cov jinja2 patch flake8 mock requests contextlib2 chardet glob2 perl pyflakes pycrypto posix m2-git anaconda-client numpy conda-verify beautifulsoup4 pytest-xdist pytest-mock filelock pkginfo psutil
- conda install -q pip pytest pytest-cov jinja2 patch flake8 mock requests contextlib2 chardet glob2 perl pyflakes pycrypto posix m2-git anaconda-client numpy conda-verify beautifulsoup4 pytest-mock filelock pkginfo psutil
- pip install pytest-mp
- if "%PYTHON_VERSION%" == "2.7" conda install -q scandir
# this is to ensure dependencies
- python --version
Expand Down Expand Up @@ -83,10 +84,10 @@ test_script:
# no libpng here because we already have the right version from the 3.5 install
- conda create -n blarg -yq --download-only python=3.6
- conda create -n blarg -yq --download-only cmake
- py.test --color=yes -v --cov conda_build --cov-report xml tests --basetemp C:\cbtmp -n 0 -m "serial"
- py.test --color=yes -v --cov conda_build --cov-report xml tests --basetemp C:\cbtmp -m "serial"
# remove all folders to avoid permission errors. Leave root files (may have coverage info there)
- for /d %%F in (c:\cbtmp\*) do rd /s /q "%%F"
- py.test --color=yes -v --cov conda_build --cov-report xml --cov-append tests --basetemp C:\cbtmp -n 2 -m "not serial"
- py.test --color=yes -v --cov conda_build --cov-report xml --cov-append tests --basetemp C:\cbtmp --mp -m "not serial"

# For debugging, this is helpful - zip up the test environment and make it available for later download.
# However, it eats up a fair amount of time. Better to disable until you need it.
Expand Down
7 changes: 3 additions & 4 deletions conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ def select_lines(data, namespace, variants_in_place):

def yamlize(data):
try:
loader_instance = copy.deepcopy(loader)
with stringify_numbers(loader_instance):
loaded_data = yaml.load(data, Loader=loader_instance)
with stringify_numbers():
loaded_data = yaml.load(data, Loader=loader)
return loaded_data
except yaml.error.YAMLError as e:
if '{{' in data:
Expand Down Expand Up @@ -797,7 +796,7 @@ def trim_build_only_deps(metadata, requirements_used):


@contextlib.contextmanager
def stringify_numbers(loader):
def stringify_numbers():
# ensure that numbers are not interpreted as ints or floats. That trips up versions
# with trailing zeros.
implicit_resolver_backup = loader.yaml_implicit_resolvers.copy()
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env =
PYTHONHASHSEED=0
markers =
serial: execute test serially (to avoid race conditions)
mp_group_info: for pytest-mp

[versioneer]
VCS = git
Expand Down

0 comments on commit 4f4d45c

Please sign in to comment.