question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Make self.dependencies available for test_package

See original GitHub issue

When 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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
franramirez688commented, Oct 27, 2022

Hi @uilianries!

I think this issue is duplicated. Have a look at https://github.com/conan-io/docs/issues/2794

0reactions
uilianriescommented, Nov 3, 2022

Closing this one as it’s duplicated with https://github.com/conan-io/docs/issues/2794

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found