--- a/src/decoder.rs +++ b/src/decoder.rs @@ -1662,3 +1662,3 @@ #[test] - fn raw_string_mode_decodes_reader_lookup_results() { + #[cfg(feature = "__with_test_data")] fn raw_string_mode_decodes_reader_lookup_results() { let reader = Reader::open_readfile("test-data/test-data/GeoIP2-City-Test.mmdb").unwrap(); @@ -1746,3 +1746,3 @@ #[test] - fn test_decoder_accepts_tuple_with_matching_length() { + #[cfg(feature = "__with_test_data")] fn test_decoder_accepts_tuple_with_matching_length() { #[allow(dead_code)] @@ -1777,3 +1777,3 @@ #[test] - fn test_decoder_rejects_tuple_length_mismatch() { + #[cfg(feature = "__with_test_data")] fn test_decoder_rejects_tuple_length_mismatch() { #[allow(dead_code)] --- a/src/lib.rs +++ b/src/lib.rs @@ -102,3 +102,3 @@ #[cfg(test)] -mod tests { +#[cfg(feature = "__with-test-data")] mod tests { use super::*; --- a/src/result.rs +++ b/src/result.rs @@ -684,3 +684,3 @@ #[test] - fn test_decode_path_error_includes_path() { + #[cfg(feature = "__with-test-data")] fn test_decode_path_error_includes_path() { use crate::Reader; --- a/Cargo.toml +++ b/Cargo.toml @@ -57,2 +57,3 @@ path = "src/lib.rs" +doctests = false --- a/src/reader_test.rs +++ b/src/reader_test.rs @@ -1 +1,2 @@ +#![cfg(feature = "__with-test-data")] use std::net::IpAddr;