Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests are not run #128

Closed
dzamlo opened this issue Jul 17, 2017 · 2 comments
Closed

Integration tests are not run #128

dzamlo opened this issue Jul 17, 2017 · 2 comments

Comments

@dzamlo
Copy link
Contributor

dzamlo commented Jul 17, 2017

The tests in the tests folder are not run.

Because of the [[test]] in Cargo.toml cargo only run the test specified here. And this test is just an empty file. Because you want to use a non-default feature in a test, this means you cannot just remove this section.

I see multiple ways to solve this issue:

  1. Manually specify all the tests in Cargo.toml
  2. Include all other tests from liquid.rs (via mod) (this could be done automatically with code generation in build.rs)
  3. Remove the section from Cargo.toml but specify the feature on the command line each time (cargo test --features "serde")
@epage
Copy link
Member

epage commented Jul 17, 2017

Thanks! I'm glad the tests still pass even if they haven't been running. I saw no indication of this behavior in the documentation, and so I opened an issue rust-lang/cargo#4290 about this.

@epage
Copy link
Member

epage commented Jul 17, 2017

Oh, and as for a fix, I'm tempted to just to make serde a default feature.

epage added a commit to epage/liquid-rust that referenced this issue Jul 17, 2017
This is actually more of a workaround that I don't mind.  There isn't a
low maintenance way to enable a feature for tests.  I misunderstood
cargo's documentation and thought I could add a `[[test]]` section but
that instead disabled all the tests.

Fixes cobalt-org#128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants