Skip to content

Conversation

@ryankert01
Copy link
Member

@ryankert01 ryankert01 commented Jan 15, 2026

Purpose of PR

  • Introduced conftest.py for root pytest configuration.
  • Added custom markers for GPU and slow tests.
  • Implemented auto-skip logic for tests requiring the QDP extension.

How to test

Test with a @pytest.mark.gpu decorated test

echo '                                                                                                                                  
import pytest                                                                                                                           
                                                                                                                                        
@pytest.mark.gpu                                                                                                                        
def test_gpu_skipped():                                                                                                                 
    from _qdp import QdpEngine                                                                                                          
    assert QdpEngine(0)                                                                                                                 
                                                                                                                                        
def test_normal():                                                                                                                      
    assert True                                                                                                                         
' > testing/test_gpu_demo.py                                                                                                            
uv run pytest testing/test_gpu_demo.py -v 

Related Issues or PRs

Closes #826

Changes Made

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Breaking Changes

  • Yes
  • No

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes
  • Successfully built and ran all unit tests or manual tests locally
  • PR title follows "MAHOUT-XXX: Brief Description" format (if related to an issue)
  • Code follows ASF guidelines

- Introduced conftest.py for root pytest configuration.
- Added custom markers for GPU and slow tests.
- Implemented auto-skip logic for tests requiring the QDP extension.

# Skip all tests in testing/qdp/ directory
fspath_str = str(item.fspath)
if "testing/qdp" in fspath_str or "testing\\qdp" in fspath_str:
Copy link
Contributor

@viiccwen viiccwen Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it mean qdp/qdp-python/tests?

Copy link
Contributor

@viiccwen viiccwen Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I saw it in #828 : )

Copy link
Member Author

@ryankert01 ryankert01 Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reading the issue!
Exactly, that’s why we change to testing folder: To align with original mahout design.

@guan404ming guan404ming merged commit af3ff8b into apache:main Jan 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add root conftest.py with QDP auto-skip logic

3 participants