Skip to content

test: Improve DataMovements tests and fix bugs#30

Open
mysticBliss wants to merge 2 commits into
mainfrom
test-improvement-datamovements-18073654400998776773
Open

test: Improve DataMovements tests and fix bugs#30
mysticBliss wants to merge 2 commits into
mainfrom
test-improvement-datamovements-18073654400998776773

Conversation

@mysticBliss

Copy link
Copy Markdown
Owner
  • Added comprehensive tests for DataMovements configuration loading in tests/test_data_movements_loading.py, mocking ConfigReader.
  • Fixed a bug in DataMovements where self.environments was used instead of self._environments.
  • Fixed broken assertions in existing tests (test_data_movements.py, test_integration.py).
  • Restored simple strftime format string support in DataFlow.py to fix test_data_flow_paths.py regression.

PR created automatically by Jules for task 18073654400998776773 started by @mysticBliss

- Added comprehensive tests for DataMovements configuration loading in `tests/test_data_movements_loading.py`, mocking `ConfigReader`.
- Fixed a bug in `DataMovements` where `self.environments` was used instead of `self._environments`.
- Fixed broken assertions in existing tests (`test_data_movements.py`, `test_integration.py`).
- Restored simple strftime format string support in `DataFlow.py` to fix `test_data_flow_paths.py` regression.

Co-authored-by: mysticBliss <11345806+mysticBliss@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- The CI environment installs a real `pyspark` (v4.1.1) but the test suite mocks it in `conftest.py`.
- This causes `pyspark.sql.functions.lit` to fail when it tries to import `pyspark.testing.utils` because `pyspark` is mocked as a MagicMock (not a package) in `sys.modules`.
- Patched `datamov.core.engine.Engine.lit` in `tests/test_integration.py` to use a mock instead of the real function, avoiding the import error.

Co-authored-by: mysticBliss <11345806+mysticBliss@users.noreply.github.com>
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.

1 participant