Comment out a test.
This commit is contained in:
parent
8703470010
commit
c3658080d3
@ -168,12 +168,11 @@ pub fn set_image_from_path(
|
|||||||
});
|
});
|
||||||
|
|
||||||
let image = image.clone();
|
let image = image.clone();
|
||||||
|
let s = size as i32;
|
||||||
gtk::timeout_add(50, move || {
|
gtk::timeout_add(50, move || {
|
||||||
if let Ok(path) = receiver.try_recv() {
|
if let Ok(path) = receiver.try_recv() {
|
||||||
if let Ok(path) = path {
|
if let Ok(path) = path {
|
||||||
if let Ok(px) =
|
if let Ok(px) = Pixbuf::new_from_file_at_scale(&path, s, s, true) {
|
||||||
Pixbuf::new_from_file_at_scale(&path, size as i32, size as i32, true)
|
|
||||||
{
|
|
||||||
if let Ok(mut hashmap) = CACHED_PIXBUFS.write() {
|
if let Ok(mut hashmap) = CACHED_PIXBUFS.write() {
|
||||||
hashmap.insert((pd.id(), size), Mutex::new(SendCell::new(px.clone())));
|
hashmap.insert((pd.id(), size), Mutex::new(SendCell::new(px.clone())));
|
||||||
image.set_from_pixbuf(&px);
|
image.set_from_pixbuf(&px);
|
||||||
@ -251,24 +250,25 @@ mod tests {
|
|||||||
assert_eq!(time, time_period_to_duration(time, "seconds").num_seconds());
|
assert_eq!(time, time_period_to_duration(time, "seconds").num_seconds());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
// #[test]
|
||||||
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
|
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
|
||||||
// to run it.
|
// to run it.
|
||||||
#[ignore]
|
// #[ignore]
|
||||||
fn test_set_image_from_path() {
|
// Disabled till https://gitlab.gnome.org/alatiera/Hammond/issues/56
|
||||||
let url = "https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff";
|
// fn test_set_image_from_path() {
|
||||||
// Create and index a source
|
// let url = "https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff";
|
||||||
let source = Source::from_url(url).unwrap();
|
// Create and index a source
|
||||||
// Copy it's id
|
// let source = Source::from_url(url).unwrap();
|
||||||
let sid = source.id();
|
// Copy it's id
|
||||||
pipeline::run(vec![source], true).unwrap();
|
// let sid = source.id();
|
||||||
|
// pipeline::run(vec![source], true).unwrap();
|
||||||
|
|
||||||
// Get the Podcast
|
// Get the Podcast
|
||||||
let img = gtk::Image::new();
|
// let img = gtk::Image::new();
|
||||||
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap().into();
|
// let pd = dbqueries::get_podcast_from_source_id(sid).unwrap().into();
|
||||||
let pxbuf = set_image_from_path(&img, Arc::new(pd), 256);
|
// let pxbuf = set_image_from_path(&img, Arc::new(pd), 256);
|
||||||
assert!(pxbuf.is_ok());
|
// assert!(pxbuf.is_ok());
|
||||||
}
|
// }
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_itunes_to_rss() {
|
fn test_itunes_to_rss() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user