Skip to content

Commit 3e993af

Browse files
committed
Split out DML tests
1 parent 72e482e commit 3e993af

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

azure-pipelines-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
matrix:
2727
${{ each image in parameters.images }}:
2828
${{ each version in parameters.versions }}:
29-
${{ format(format(' {0}{1}', variables.imgPart, variables.verPart), image, version) }}:
29+
${{ format(format('{0}{1} ', variables.imgPart, variables.verPart), image, version) }}:
3030
imageName: ${{ image }}
3131
python.version: ${{ version }}
3232

azure-pipelines.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,42 @@ jobs:
159159
parameters:
160160
package: '-e .[tf,plt]'
161161
job:
162-
job: 'Tests'
162+
job: Tests_no_dml
163163
dependsOn: 'EvalChanges'
164164
condition: eq(dependencies.EvalChanges.outputs['output.testCode'], 'True')
165-
displayName: 'Run tests '
165+
displayName: 'Run tests (non-DML)'
166166
steps:
167167
- script: 'pip install pytest-runner && python setup.py pytest'
168168
displayName: 'Unit tests'
169169
env:
170-
PYTEST_ADDOPTS: '-m "not (notebook or automl)"'
170+
PYTEST_ADDOPTS: '-m "not (notebook or automl or dml)"'
171+
COVERAGE_PROCESS_START: 'setup.cfg'
172+
- task: PublishTestResults@2
173+
displayName: 'Publish Test Results **/test-results.xml'
174+
inputs:
175+
testResultsFiles: '**/test-results.xml'
176+
testRunTitle: 'Python $(python.version), image $(imageName)'
177+
condition: succeededOrFailed()
178+
179+
- task: PublishCodeCoverageResults@1
180+
displayName: 'Publish Code Coverage Results'
181+
inputs:
182+
codeCoverageTool: Cobertura
183+
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
184+
185+
- template: azure-pipelines-steps.yml
186+
parameters:
187+
package: '-e .[tf,plt]'
188+
job:
189+
job: Tests_dml
190+
dependsOn: 'EvalChanges'
191+
condition: eq(dependencies.EvalChanges.outputs['output.testCode'], 'True')
192+
displayName: 'Run tests (DML)'
193+
steps:
194+
- script: 'pip install pytest-runner && python setup.py pytest'
195+
displayName: 'Unit tests'
196+
env:
197+
PYTEST_ADDOPTS: '-m "dml and (not (notebook or automl))"'
171198
COVERAGE_PROCESS_START: 'setup.cfg'
172199
- task: PublishTestResults@2
173200
displayName: 'Publish Test Results **/test-results.xml'

econml/tests/test_dml.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def rand_sol(A, b):
3333
return x + (np.eye(x.shape[0]) - A_plus @ A) @ np.random.normal(size=x.shape)
3434

3535

36+
@pytest.mark.dml
3637
class TestDML(unittest.TestCase):
3738

3839
def test_cate_api(self):

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ addopts = "--junitxml=junit/test-results.xml -n auto --strict-markers --cov-conf
1313
markers = [
1414
"slow",
1515
"notebook",
16-
"automl"
16+
"automl",
17+
"dml"
1718
]

0 commit comments

Comments
 (0)