• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 The Abseil Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""A helper test program for absltest_sharding_test."""
16
17import sys
18
19from absl.testing import absltest
20
21
22class ClassA(absltest.TestCase):
23  """Helper test case A for absltest_sharding_test."""
24
25  def testA(self):
26    sys.stderr.write('\nclass A test A\n')
27
28  def testB(self):
29    sys.stderr.write('\nclass A test B\n')
30
31  def testC(self):
32    sys.stderr.write('\nclass A test C\n')
33
34
35class ClassB(absltest.TestCase):
36  """Helper test case B for absltest_sharding_test."""
37
38  def testA(self):
39    sys.stderr.write('\nclass B test A\n')
40
41  def testB(self):
42    sys.stderr.write('\nclass B test B\n')
43
44  def testC(self):
45    sys.stderr.write('\nclass B test C\n')
46
47  def testD(self):
48    sys.stderr.write('\nclass B test D\n')
49
50  def testE(self):
51    sys.stderr.write('\nclass B test E\n')
52    self.fail('Force failure')
53
54
55if __name__ == '__main__':
56  absltest.main()
57