Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #708 from auscompgeek/datalog-get
Browse files Browse the repository at this point in the history
Fix DataLogManager.getLog() trying to copy
  • Loading branch information
auscompgeek authored Mar 19, 2022
2 parents cdf3c37 + dc920f0 commit c51b1fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions gen/DataLogManager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ classes:
Start:
Log:
GetLog:
return_value_policy: reference
GetLogDir:
LogNetworkTables:
10 changes: 10 additions & 0 deletions tests/test_datalogmanager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pathlib
import wpilib


def test_get_log(tmp_path: pathlib.Path):
log_dir = tmp_path / "wpilogs"
log_dir.mkdir()
wpilib.DataLogManager.start(str(log_dir))
log = wpilib.DataLogManager.getLog()
assert log is not None

0 comments on commit c51b1fc

Please sign in to comment.