Skip to content

Commit

Permalink
Update documentation to reference change of unittest.bzl
Browse files Browse the repository at this point in the history
RELNOTES: None.
PiperOrigin-RevId: 231970476
  • Loading branch information
c-parsons authored and Copybara-Service committed Feb 1, 2019
1 parent 297329b commit b9418ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/docs/skylark/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _provider_contents_test_impl(ctx):
asserts.equals(env,
expected="some value",
actual=ctx.attr.dep[MyInfo].val)
unittest.end(env)
return unittest.end(env)

# Create the testing rule to wrap the test logic. Note that this must be bound
# to a global variable due to restrictions on how rules can be defined. Also,
Expand Down Expand Up @@ -207,7 +207,7 @@ def _file_action_test_impl(ctx):
action = actions.by_file[dep.out]
# Check the content that is to be written by the action.
asserts.equals(env, action.content, "abc")
unittest.end(env)
return unittest.end(env)

file_action_test = unittest.make(_file_action_test_impl,
attrs={"dep": attr.label()})
Expand Down Expand Up @@ -429,7 +429,7 @@ load(":myhelpers.bzl", "myhelper")
def _myhelper_test_impl(ctx):
env = unittest.begin(ctx)
asserts.equals(env, "abc", myhelper())
unittest.end(env)
return unittest.end(env)

myhelper_test = unittest.make(_myhelper_test_impl)

Expand Down

0 comments on commit b9418ee

Please sign in to comment.