Improve the way we make the subplot tests opt-in.

- Promote subplotlib to a proper dependency, as dev-dependencies can
    not be optional.
This commit is contained in:
Justus Winter 2024-08-15 14:12:07 +02:00
parent 9b16970655
commit c94fb2249d
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
2 changed files with 7 additions and 3 deletions

View File

@ -53,6 +53,7 @@ tokio = { version = "1.13.1" }
rpassword = "7.0"
serde_json = "1.0.80"
serde = { version = "1.0.137", features = ["derive"] }
subplotlib = { version = ">=0.7, <0.10", optional = true }
terminal_size = ">=0.2.6, <0.4"
termcolor = "1.2.0"
textwrap = ">=0.15, <0.17"
@ -75,7 +76,6 @@ cfg-if = "1"
terminal_size = ">=0.2.6, <0.4"
[dev-dependencies]
subplotlib = ">=0.7, <0.10"
fehler = "1.0.0"
assert_cmd = "2"
predicates = ">=2, <4"
@ -87,6 +87,11 @@ name = "sq"
path = "src/main.rs"
bench = false
[[test]]
name = "sq-subplot"
path = "tests/sq-subplot.rs"
required-features = ["subplot"]
[features]
default = [
"crypto-nettle",
@ -97,7 +102,7 @@ crypto-botan = ["sequoia-openpgp/crypto-botan"]
crypto-botan2 = ["sequoia-openpgp/crypto-botan2"]
crypto-cng = ["sequoia-openpgp/crypto-cng"]
crypto-rust = ["sequoia-openpgp/crypto-rust"]
subplot = ["subplot-build"]
subplot = ["subplot-build", "subplotlib"]
[profile.release]
debug = true

View File

@ -1,2 +1 @@
#![cfg(feature = "subplot")]
include!(concat!(env!("OUT_DIR"), "/sq.rs"));