1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

update to tokio 1.0

This commit is contained in:
Jan Lukas Gernert 2021-01-06 09:53:47 +01:00
parent c607892367
commit 7e05a98f30
3 changed files with 9 additions and 9 deletions

View file

@ -10,13 +10,13 @@ repository = "https://gitlab.com/news-flash/article_scraper"
[dependencies] [dependencies]
failure = "0.1" failure = "0.1"
libxml = "0.2" libxml = "0.2"
reqwest = { version = "0.10", features = ["json", "native-tls"] } reqwest = { version = "0.11", features = ["json", "native-tls"] }
tokio = { version = "=0.2", features = ["macros"] } tokio = { version = "1.0", features = ["macros"] }
url = "2.1" url = "2.2"
regex = "1.3" regex = "1.4"
encoding_rs = "0.8" encoding_rs = "0.8"
chrono = "0.4" chrono = "0.4"
base64 = "0.12" base64 = "0.13"
image = "0.23" image = "0.23"
log = "0.4" log = "0.4"
parking_lot = "0.11" parking_lot = "0.11"

View file

@ -318,7 +318,7 @@ mod tests {
use std::fs; use std::fs;
use std::io::Write; use std::io::Write;
#[tokio::test(basic_scheduler)] #[tokio::test(flavor = "current_thread")]
async fn close_tags() { async fn close_tags() {
let image_dowloader = ImageDownloader::new((2048, 2048)); let image_dowloader = ImageDownloader::new((2048, 2048));
let hdyleaflet = fs::read_to_string(r"./resources/tests/planetGnome/fedora31.html") let hdyleaflet = fs::read_to_string(r"./resources/tests/planetGnome/fedora31.html")

View file

@ -791,7 +791,7 @@ mod tests {
use crate::*; use crate::*;
use reqwest::Client; use reqwest::Client;
#[tokio::test(basic_scheduler)] #[tokio::test(flavor = "current_thread")]
async fn golem() { async fn golem() {
let config_path = PathBuf::from(r"./resources/tests/golem"); let config_path = PathBuf::from(r"./resources/tests/golem");
let out_path = PathBuf::from(r"./test_output"); let out_path = PathBuf::from(r"./test_output");
@ -810,7 +810,7 @@ mod tests {
assert_eq!(article.author, Some(String::from("Hauke Gierow"))); assert_eq!(article.author, Some(String::from("Hauke Gierow")));
} }
#[tokio::test(basic_scheduler)] #[tokio::test(flavor = "current_thread")]
async fn phoronix() { async fn phoronix() {
let config_path = PathBuf::from(r"./resources/tests/phoronix"); let config_path = PathBuf::from(r"./resources/tests/phoronix");
let out_path = PathBuf::from(r"./test_output"); let out_path = PathBuf::from(r"./test_output");
@ -831,7 +831,7 @@ mod tests {
); );
} }
#[tokio::test(basic_scheduler)] #[tokio::test(flavor = "current_thread")]
async fn youtube() { async fn youtube() {
let config_path = PathBuf::from(r"./resources/tests/"); let config_path = PathBuf::from(r"./resources/tests/");
let url = url::Url::parse("https://www.youtube.com/watch?v=lHRkYLcmFY8").unwrap(); let url = url::Url::parse("https://www.youtube.com/watch?v=lHRkYLcmFY8").unwrap();