I've been using this script for testing.
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
board = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
board.set_text("hello there", -1)
board.store()
It does erase anything I have in my clipboard, but it doesn't add "hello there". It just leaves empty my clipboard. It seems like other people who have used this script say that it works, so I'm not really sure about what could be causing this.
I've used this as my resource.
Edit: This also happens to me with tkinter, so I believe that it might not be exclusive to GTK. It's probably client-side.
Tkinter code I've used to test:
from tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append('i can has clipboardz?')
r.destroy()