diff --git a/changes/3551.misc b/changes/3551.misc new file mode 100644 index 0000000000..73d014fe7f --- /dev/null +++ b/changes/3551.misc @@ -0,0 +1 @@ +Implement Documents, Desktop & Pictures paths in the Dummy backend and update the simple test app to print them. diff --git a/core/tests/testbed/interactive.py b/core/tests/testbed/interactive.py index 6d6d3c3d83..66ec1a0d95 100644 --- a/core/tests/testbed/interactive.py +++ b/core/tests/testbed/interactive.py @@ -22,6 +22,10 @@ def main(): print(f"app.paths.logs={app.paths.logs.resolve()}") print(f"app.paths.toga={app.paths.toga.resolve()}") + print(f"app.paths.documents={app.paths.documents}") + print(f"app.paths.desktop={app.paths.desktop}") + print(f"app.paths.pictures={app.paths.pictures}") + if __name__ == "__main__": main() diff --git a/core/tests/testbed/simple/app.py b/core/tests/testbed/simple/app.py index be558b3dbc..08a58d7895 100644 --- a/core/tests/testbed/simple/app.py +++ b/core/tests/testbed/simple/app.py @@ -10,6 +10,9 @@ def main(): print(f"app.paths.cache={app.paths.cache.resolve()}") print(f"app.paths.logs={app.paths.logs.resolve()}") print(f"app.paths.toga={app.paths.toga.resolve()}") + print(f"app.paths.documents={app.paths.documents.resolve()}") + print(f"app.paths.desktop={app.paths.desktop.resolve()}") + print(f"app.paths.pictures={app.paths.pictures.resolve()}") if __name__ == "__main__": diff --git a/dummy/src/toga_dummy/paths.py b/dummy/src/toga_dummy/paths.py index 45cc69089a..76c1492433 100644 --- a/dummy/src/toga_dummy/paths.py +++ b/dummy/src/toga_dummy/paths.py @@ -18,3 +18,12 @@ def get_cache_path(self): def get_logs_path(self): return Path.home() / "logs" / App.app.app_id + + def get_documents_path(self): + return Path.home() / "Documents" + + def get_pictures_path(self): + return Path.home() / "Pictures" + + def get_desktop_path(self): + return Path.home() / "Desktop"