def test_expand_rule(): from rospkg.distro import expand_rule assert "foo" == expand_rule("$STACK_NAME", "foo", "version", "release") assert "version" == expand_rule("$STACK_VERSION", "foo", "version", "release") assert "release" == expand_rule("$RELEASE_NAME", "foo", "version", "release") assert "foo-version-release" == expand_rule("$STACK_NAME-$STACK_VERSION-$RELEASE_NAME", "foo", "version", "release")
def test_expand_rule(): from rospkg.distro import expand_rule assert 'foo' == expand_rule('$STACK_NAME', 'foo', 'version', 'release') assert 'version' == expand_rule('$STACK_VERSION', 'foo', 'version', 'release') assert 'release' == expand_rule('$RELEASE_NAME', 'foo', 'version', 'release') assert 'foo-version-release' == expand_rule( '$STACK_NAME-$STACK_VERSION-$RELEASE_NAME', 'foo', 'version', 'release')
def test_expand_rule(): from rospkg.distro import expand_rule assert 'foo' == expand_rule('$STACK_NAME', 'foo', 'version', 'release') assert 'version' == expand_rule('$STACK_VERSION', 'foo', 'version', 'release') assert 'release' == expand_rule('$RELEASE_NAME', 'foo', 'version', 'release') assert 'foo-version-release' == expand_rule('$STACK_NAME-$STACK_VERSION-$RELEASE_NAME', 'foo', 'version', 'release')