tensorflow/tensorflow

View on GitHub
tensorflow/python/kernel_tests/variables/resource_variable_ops_test.py

Summary

Maintainability
F
6 days
Test Coverage

File resource_variable_ops_test.py has 1579 lines of code (exceeds 250 allowed). Consider refactoring.
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
Severity: Major
Found in tensorflow/python/kernel_tests/variables/resource_variable_ops_test.py - About 4 days to fix

    ResourceVariableOpsTest has 127 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ResourceVariableOpsTest(test_util.TensorFlowTestCase,
                                  parameterized.TestCase):
    
      def tearDown(self):
        gc.collect()
    Severity: Major
    Found in tensorflow/python/kernel_tests/variables/resource_variable_ops_test.py - About 2 days to fix

      Function testAssignReturnsVariable has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      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)

        There are no issues that match your filters.

        Category
        Status