bazelbuild / rules_testing

Starlark testing framework and utility libraries
https://rules-testing.readthedocs.io/
Apache License 2.0
22 stars 5 forks source link

Add support for `tuple` to collection subjects #69

Closed fmeum closed 1 year ago

fmeum commented 1 year ago

tuples are as list-like or more than depsets, but previously resulted in a fail when passed to collection subject functions.

Along the way remove an incorrect comment about str being iterable, which it is in Python but not in Starlark.

fmeum commented 1 year ago

@rickeylev CI is failing and I can't access the buildkite logs, but tests are passing locally.

comius commented 1 year ago

@rickeylev CI is failing and I can't access the buildkite logs, but tests are passing locally.


##### :bazel: buildifier: found 8 lint issues in your WORKSPACE, BUILD and *.bzl files
--
  | <pre><code><a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/docgen/docgen.bzl#L18">docgen/docgen.bzl:18:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/lib/private/default_info_subject.bzl#L18">lib/private/default_info_subject.bzl:18:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/lib/test_suite.bzl#L7">lib/test_suite.bzl:7:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/lib/truth.bzl#L57">lib/truth.bzl:57:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/tests/struct_subject/struct_subject_tests.bzl#L18">tests/struct_subject/struct_subject_tests.bzl:18:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/tests/test_util.bzl#L19">tests/test_util.bzl:19:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/tests/truth_tests.bzl#L19">tests/truth_tests.bzl:19:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
  | <a href="https://github.com/fmeum/rules_testing/blob/c0631c8a8388bd1948ff7c679e6fdce917d00889/tests/unit_test_tests.bzl#L4">tests/unit_test_tests.bzl:4:1</a>: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.</pre></code>
fmeum commented 1 year ago

@comius Thanks, got it to pass by fixing the (unrelated) failures.