tensorflow/python/kernel_tests/variables/resource_variable_ops_test.py
File resource_variable_ops_test.py
has 1579 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
ResourceVariableOpsTest
has 127 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ResourceVariableOpsTest(test_util.TensorFlowTestCase,
parameterized.TestCase):
def tearDown(self):
gc.collect()
Function testAssignReturnsVariable
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def testAssignReturnsVariable(self):
var = resource_variable_ops.ResourceVariable(1.)
self.evaluate(variables.global_variables_initializer())
assigned = var.assign(2.)
self.assertIsInstance(assigned, resource_variable_ops.BaseResourceVariable)