Skip to content

Commit

Permalink
Adds tests for local tracking client
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahbenizzy committed Jan 11, 2025
1 parent 043e274 commit 9f328e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions burr/tracking/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def copy(self) -> "LocalTrackingClient":
return LocalTrackingClient(
project=self.project_id,
storage_dir=self.raw_storage_dir,
serde_kwargs=self.serde_kwargs,
)

@classmethod
Expand Down
10 changes: 10 additions & 0 deletions tests/tracking/test_local_tracking_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,13 @@ def state_2(state: State) -> State:
)

app.run(halt_after=["state_2"])


def test_local_tracking_client_copy():
"""Tests tracking client .copy() method for serialization/parallelism.
Internal-facing contracts but we want coverage here."""
tracking_client = LocalTrackingClient("foo", "storage_dir", serde_kwargs={"foo": "bar"})
copy = tracking_client.copy()
assert copy.project_id == tracking_client.project_id
assert copy.serde_kwargs == tracking_client.serde_kwargs
assert copy.storage_dir == tracking_client.storage_dir

0 comments on commit 9f328e3

Please sign in to comment.