feat: Set up comprehensive Python testing infrastructure with Poetry#99
Open
llbbl wants to merge 1 commit intoandyzeng:masterfrom
Open
feat: Set up comprehensive Python testing infrastructure with Poetry#99llbbl wants to merge 1 commit intoandyzeng:masterfrom
llbbl wants to merge 1 commit intoandyzeng:masterfrom
Conversation
- Migrate to Poetry for dependency management with pyproject.toml - Add pytest, pytest-cov, and pytest-mock as development dependencies - Configure pytest with coverage reporting, custom markers, and test discovery - Create testing directory structure with unit/integration subdirectories - Add comprehensive shared fixtures in conftest.py for mocking and testing - Update .gitignore with testing artifacts and Claude settings - Include validation tests to verify infrastructure functionality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set Up Python Testing Infrastructure
Summary
This PR establishes a comprehensive testing infrastructure for the visual-pushing-grasping project, migrating from manual dependency management to Poetry and setting up pytest with all necessary tooling for effective test development.
Changes Made
Package Management
pyproject.tomlwith Poetry configurationpoetry.lockfor reproducible installationsTesting Configuration
pytest Configuration in
pyproject.toml:test_*.pyand*_test.pyunit,integration,slowCoverage Configuration:
Directory Structure
Shared Fixtures (conftest.py)
temp_dir: Temporary directory managementmock_config: Configuration object for testingsample_rgb_image,sample_depth_image: Test image datamock_robot,mock_trainer,mock_logger: Mocked componentsvrep_connection: Mock V-REP simulation connectionsample_workspace_limits: Robot workspace boundariessample_torch_model: Simple PyTorch model for testingAdditional Updates
Usage Instructions
Installation
Running Tests
Writing Tests
tests/unit/ortests/integration/conftest.pyfor common test needs@pytest.mark.unit,@pytest.mark.integration,@pytest.mark.slowValidation
The infrastructure has been validated with 17 passing tests that verify:
Notes
poetry run testandpoetry run testscommands are available for developer preference