[feature] Make self.dependencies available for test_package
See original GitHub issueWhen creating a test package for a Conan tool package, there are few ways to validate its package. One way checking its output, like its version and comparing from the package:
def test(self)
output = io.StringIO()
self.run("foo --version", env="conanrun", output=output)
current_version = str(output.getvalue())
require_version = str(self.deps_cpp_info["foo"].version)
assert required_version == current_version
In case we try to use self.dependencies["foo"]
, it returns None
.
- I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[question] how to specify `requires`/`tool_requires` for ... - GitHub
I'm using host/build contexts with 1.47 and trying to make my recipes as Conan v2 ... test package adds dependency as tool_requires ......
Read more >Set up project for AndroidX Test - Android Developers
To modify your app project's dependencies, complete the following steps: Step 1: Open the build.gradle file for your Gradle module. Step 2: In ......
Read more >Test package behaviour when suggested dependency is not ...
In this particular case, the suggested package is data.tree and the optional behaviour is making a pretty print instead of a more boring...
Read more >conan create — conan 1.55.0 documentation
Builds a binary package for a recipe (conanfile.py). Uses the specified configuration in a profile or in -s settings, -o options, etc.
Read more >12. Packages, Testing, and Continuous Integration
Specifying dependencies (and their versions) so that your project works across ... help your future self to reproduce your results and make changes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @uilianries!
I think this issue is duplicated. Have a look at https://github.com/conan-io/docs/issues/2794
Closing this one as it’s duplicated with https://github.com/conan-io/docs/issues/2794