1# Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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"""Tests for tf.contrib.stateless API. 16 17The real tests are in python/kernel_tests/random/stateless_random_ops_test.py. 18""" 19 20from __future__ import absolute_import 21from __future__ import division 22from __future__ import print_function 23 24from tensorflow.contrib import stateless 25from tensorflow.python.ops import stateless_random_ops 26from tensorflow.python.platform import test 27 28 29class StatelessOpsTest(test.TestCase): 30 31 def testAPI(self): 32 self.assertIs(stateless.stateless_random_uniform, 33 stateless_random_ops.stateless_random_uniform) 34 self.assertIs(stateless.stateless_random_normal, 35 stateless_random_ops.stateless_random_normal) 36 self.assertIs(stateless.stateless_truncated_normal, 37 stateless_random_ops.stateless_truncated_normal) 38 self.assertIs(stateless.stateless_multinomial, 39 stateless_random_ops.stateless_multinomial) 40 41 42if __name__ == '__main__': 43 test.main() 44