From e8d3fdf5efa580b1742af7898e2715d6bd42d1f0 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 23 Dec 2019 17:04:08 +0000 Subject: [PATCH 1/4] Remove powershell checks for test failures --- ci/azure/posix.yml | 11 ++--------- ci/azure/windows.yml | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 55f80bf644ecc..cb0b17e3553a4 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -69,20 +69,13 @@ jobs: displayName: 'Build versions' - task: PublishTestResults@2 + condition: succeededOrFailed() inputs: + failTaskOnFailedTests: true testResultsFiles: 'test-data.xml' testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }} displayName: 'Publish test results' - - powershell: | - $(Get-Content "test-data.xml" | Out-String) -match 'failures="(.*?)"' - if ($matches[1] -eq 0) { - Write-Host "No test failures in test-data" - } else { - Write-Error "$($matches[1]) tests failed" # will produce $LASTEXITCODE=1 - } - displayName: 'Check for test failures' - - script: | source activate pandas-dev python ci/print_skipped.py diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index 86807b4010988..97d4b3d6c15fa 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -23,32 +23,33 @@ jobs: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin" displayName: 'Add conda to PATH' + - script: conda update -q -n base conda displayName: 'Update conda' + - bash: | conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml displayName: 'Create anaconda environment' + - bash: | source activate pandas-dev conda list ci\\incremental\\build.cmd - displayName: 'Build' + displayName: 'Build + ' - bash: | source activate pandas-dev ci/run_tests.sh displayName: 'Test' + - task: PublishTestResults@2 + condition: succeededOrFailed() inputs: + failTaskOnFailedTests: true testResultsFiles: 'test-data.xml' - testRunTitle: 'Windows-$(CONDA_PY)' - - powershell: | - $(Get-Content "test-data.xml" | Out-String) -match 'failures="(.*?)"' - if ($matches[1] -eq 0) { - Write-Host "No test failures in test-data" - } else { - Write-Error "$($matches[1]) tests failed" # will produce $LASTEXITCODE=1 - } - displayName: 'Check for test failures' + testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }} + displayName: 'Publish test results' + - bash: | source activate pandas-dev python ci/print_skipped.py From 9f773921db25e8536927fe8c74797462bcc0dd96 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 23 Dec 2019 17:04:16 +0000 Subject: [PATCH 2/4] Failing test --- pandas/tests/arrays/test_array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/arrays/test_array.py b/pandas/tests/arrays/test_array.py index f2a4e73e7b6ad..e1104e00fa206 100644 --- a/pandas/tests/arrays/test_array.py +++ b/pandas/tests/arrays/test_array.py @@ -343,7 +343,7 @@ def test_searchsorted(self, string_dtype): result = arr.searchsorted("a", side="left") assert is_scalar(result) - assert result == 0 + assert result == 1 result = arr.searchsorted("a", side="right") assert is_scalar(result) From 2c3c87f5d3facc10b520b46340715eb91602bcac Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 23 Dec 2019 17:07:53 +0000 Subject: [PATCH 3/4] Fix new lines --- ci/azure/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index 97d4b3d6c15fa..4de520bd52966 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -35,8 +35,8 @@ jobs: source activate pandas-dev conda list ci\\incremental\\build.cmd - displayName: 'Build - ' + displayName: 'Build' + - bash: | source activate pandas-dev ci/run_tests.sh From 0b34bdad044968e769bc4f3afcb2c9b29979003d Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 23 Dec 2019 18:05:26 +0000 Subject: [PATCH 4/4] Remove failing test --- pandas/tests/arrays/test_array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/arrays/test_array.py b/pandas/tests/arrays/test_array.py index e1104e00fa206..f2a4e73e7b6ad 100644 --- a/pandas/tests/arrays/test_array.py +++ b/pandas/tests/arrays/test_array.py @@ -343,7 +343,7 @@ def test_searchsorted(self, string_dtype): result = arr.searchsorted("a", side="left") assert is_scalar(result) - assert result == 1 + assert result == 0 result = arr.searchsorted("a", side="right") assert is_scalar(result)