From 1245d9d3078f8ca5228ee69de433c9077b33e23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Garc=C3=ADa=20Morillo?= Date: Fri, 18 Oct 2024 01:51:51 +0200 Subject: [PATCH] Fixed tests --- .github/workflows/rust.yml | 8 ++------ src/temporal/number/mod.rs | 1 + src/temporal/tbool.rs | 6 +++++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 092c219..b8f4e27 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -50,9 +50,5 @@ jobs: - name: Build run: cargo build --verbose - - name: Run lib tests - # They need to be run in sequence because MEOS doesn't support multi-threading - run: cargo test --verbose --lib -- --test-threads 1 - - - name: Run doc tests - run: cargo test --verbose --doc + - name: Run tests + run: cargo test --verbose diff --git a/src/temporal/number/mod.rs b/src/temporal/number/mod.rs index faef084..4eb8b11 100644 --- a/src/temporal/number/mod.rs +++ b/src/temporal/number/mod.rs @@ -3,6 +3,7 @@ pub mod tint; pub mod tnumber; #[cfg(test)] +#[serial_test::serial] mod tests { use crate::{meos_initialize, meos_initialize_timezone}; diff --git a/src/temporal/tbool.rs b/src/temporal/tbool.rs index 0a7accd..1afe9fc 100644 --- a/src/temporal/tbool.rs +++ b/src/temporal/tbool.rs @@ -543,14 +543,16 @@ impl BitOr for TBool { impl TBoolTrait for TBool {} #[cfg(test)] +#[serial_test::serial] mod tests { - use crate::meos_initialize; + use crate::{meos_initialize, meos_initialize_timezone}; use super::*; #[test] fn instant_tbool() { meos_initialize(); + meos_initialize_timezone("UTC"); let string = "t@2018-01-01 08:00:00+00"; let result: TBool = string.parse().unwrap(); assert_eq!( @@ -562,6 +564,7 @@ mod tests { #[test] fn sequence_tbool() { meos_initialize(); + meos_initialize_timezone("UTC"); let string = "[t@2018-01-01 08:00:00+00]"; let result: TBool = string.parse().unwrap(); assert_eq!( @@ -573,6 +576,7 @@ mod tests { #[test] fn sequence_set_tbool() { meos_initialize(); + meos_initialize_timezone("UTC"); let string = "{[t@2018-01-01 08:00:00+00]}"; let result: TBool = string.parse().unwrap(); assert_eq!(