Skip to content

Commit

Permalink
BUG: testing on windows
Browse files Browse the repository at this point in the history
- we are passing builds which actually have an error
- fix the small dtype issues

Author: Jeff Reback <jeff@reback.net>

Closes pandas-dev#15445 from jreback/windows and squashes the following commits:

a5b7fb3 [Jeff Reback] change integer to power comparisions
eab15c4 [Jeff Reback] don't force remove pandas
cf3b9bd [Jeff Reback] more windows fixing
efe6a76 [Jeff Reback] add cython to build
8194e63 [Jeff Reback] don't use appveyor recipe, just build inplace
e064825 [Jeff Reback] TST: resample dtype issue xref pandas-dev#15418
10d9b26 [Jeff Reback] TST: run windows tests so failures show up in appeveyor
  • Loading branch information
jreback committed Feb 18, 2017
1 parent 29aeffb commit be4a63f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 58 deletions.
12 changes: 5 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,19 @@ install:
# this is now the downloaded conda...
- cmd: conda info -a

# build em using the local source checkout in the correct windows env
- cmd: '%CMD_IN_ENV% conda build ci\appveyor.recipe -q'

# create our env
- cmd: conda create -q -n pandas python=%PYTHON_VERSION% pytest
- cmd: conda create -q -n pandas python=%PYTHON_VERSION% cython pytest
- cmd: activate pandas
- SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run
- cmd: echo "installing requirements from %REQ%"
- cmd: conda install -n pandas -q --file=%REQ%
- cmd: conda list -n pandas
- cmd: echo "installing requirements from %REQ% - done"
- ps: conda install -n pandas (conda build ci\appveyor.recipe -q --output)

# build em using the local source checkout in the correct windows env
- cmd: '%CMD_IN_ENV% python setup.py build_ext --inplace'

test_script:
# tests
- cmd: activate pandas
- cmd: cd \
- cmd: python -c "import pandas; pandas.test(['--skip-slow', '--skip-network'])"
- cmd: test.bat
2 changes: 0 additions & 2 deletions ci/appveyor.recipe/bld.bat

This file was deleted.

2 changes: 0 additions & 2 deletions ci/appveyor.recipe/build.sh

This file was deleted.

37 changes: 0 additions & 37 deletions ci/appveyor.recipe/meta.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions pandas/tests/indexing/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ def test_boolean_indexing(self):
[0, 1, 2, 10, 4, 5, 6, 7, 8, 9],
[10, 10, 10, 3, 4, 5, 6, 7, 8, 9]]
for cond, data in zip(conditions, expected_data):
result = df.copy()
result.loc[cond, 'x'] = 10
result = df.assign(x=df.mask(cond, 10).astype('int64'))
expected = pd.DataFrame(data,
index=pd.to_timedelta(range(10), unit='s'),
columns=['x'])
Expand Down
10 changes: 5 additions & 5 deletions pandas/tests/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from pandas.core.api import DataFrame, Panel
from pandas.computation import expressions as expr
from pandas import compat, _np_version_under1p12
from pandas import compat, _np_version_under1p11
from pandas.util.testing import (assert_almost_equal, assert_series_equal,
assert_frame_equal, assert_panel_equal,
assert_panel4d_equal, slow)
Expand Down Expand Up @@ -70,10 +70,10 @@ def run_arithmetic(self, df, other, assert_func, check_dtype=False,
operations.append('div')
for arith in operations:

# numpy >= 1.12 doesn't handle integers
# numpy >= 1.11 doesn't handle integers
# raised to integer powers
# https://github.com/pandas-dev/pandas/issues/15363
if arith == 'pow' and not _np_version_under1p12:
if arith == 'pow' and not _np_version_under1p11:
continue

operator_name = arith
Expand Down Expand Up @@ -272,10 +272,10 @@ def testit():
for op, op_str in [('add', '+'), ('sub', '-'), ('mul', '*'),
('div', '/'), ('pow', '**')]:

# numpy >= 1.12 doesn't handle integers
# numpy >= 1.11 doesn't handle integers
# raised to integer powers
# https://github.com/pandas-dev/pandas/issues/15363
if op == 'pow' and not _np_version_under1p12:
if op == 'pow' and not _np_version_under1p11:
continue

if op == 'div':
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/tseries/test_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ def test_resample_nunique_with_date_gap(self):
index = pd.date_range('1-1-2000', '2-15-2000', freq='h')
index2 = pd.date_range('4-15-2000', '5-15-2000', freq='h')
index3 = index.append(index2)
s = pd.Series(range(len(index3)), index=index3)
s = pd.Series(range(len(index3)), index=index3, dtype='int64')
r = s.resample('M')

# Since all elements are unique, these should all be the same
Expand Down
3 changes: 1 addition & 2 deletions test.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
:: test on windows

:: nosetests --exe -A "not slow and not network and not disabled" pandas %*
pytest pandas
pytest --skip-slow --skip-network pandas

0 comments on commit be4a63f

Please sign in to comment.