Skip to content

Commit

Permalink
Copy unittest.bzl from bazel_skylib to rules_testing.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 627817663
  • Loading branch information
A Googler authored and Blaze Rules Copybara committed Apr 24, 2024
1 parent 1dfcb4f commit 28284c7
Show file tree
Hide file tree
Showing 7 changed files with 715 additions and 8 deletions.
15 changes: 14 additions & 1 deletion lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,26 @@ bzl_library(
srcs = ["util.bzl"],
visibility = ["//visibility:public"],
deps = [
":unittest",
"@bazel_skylib//lib:paths",
"@bazel_skylib//lib:types",
"@bazel_skylib//lib:unittest",
"@bazel_skylib//rules:write_file",
],
)

# This version is forked from bazel_skylib
bzl_library(
name = "unittest",
srcs = ["unittest.bzl"],
visibility = ["//visibility:public"],
deps = [
"@bazel_skylib//lib:new_sets",
"@bazel_skylib//lib:partial",
"@bazel_skylib//lib:sets",
"@bazel_skylib//lib:types",
],
)

bzl_library(
name = "unit_test_bzl",
srcs = ["unit_test.bzl"],
Expand Down
2 changes: 1 addition & 1 deletion lib/private/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ bzl_library(
bzl_library(
name = "expect_meta_bzl",
srcs = ["expect_meta.bzl"],
deps = ["@bazel_skylib//lib:unittest"],
deps = ["//lib:unittest"],
)

bzl_library(
Expand Down
2 changes: 1 addition & 1 deletion lib/private/expect_meta.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ExpectMeta object implementation.
"""

load("@bazel_skylib//lib:unittest.bzl", ut_asserts = "asserts")
load("//lib:unittest.bzl", ut_asserts = "asserts")

def _expect_meta_new(env, exprs = [], details = [], format_str_kwargs = None):
"""Creates a new "ExpectMeta" struct".
Expand Down
Loading

0 comments on commit 28284c7

Please sign in to comment.