test(dynamic label): do not run if cannot initialise gtk

This commit is contained in:
Jake Stanger 2022-11-28 22:46:32 +00:00
parent ec69649a04
commit 907a565f3d
No known key found for this signature in database
GPG Key ID: C51FC8F9CB0BEA61

View File

@ -118,8 +118,10 @@ mod tests {
#[tokio::test] #[tokio::test]
async fn test() { async fn test() {
gtk::init().unwrap(); // TODO: see if we can run gtk tests in ci
if gtk::init().is_ok() {
let label = gtk::Label::new(None); let label = gtk::Label::new(None);
DynamicLabel::new(label, "Uptime: {{1000:uptime -p | cut -d ' ' -f2-}}"); DynamicLabel::new(label, "Uptime: {{1000:uptime -p | cut -d ' ' -f2-}}");
} }
} }
}