tensorflow/tensorflow

View on GitHub
tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py

Summary

Maintainability
F
1 wk
Test Coverage

File lookup_ops_test.py has 3470 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2017 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/data_structures/lookup_ops_test.py - About 1 wk to fix

    MutableHashTableOpTest has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class MutableHashTableOpTest(test.TestCase):
    
      def testMutableHashTable(self, is_anonymous):
        if is_anonymous and not tf2.enabled():
          self.skipTest(SKIP_ANONYMOUS_IN_TF1_REASON)
    Severity: Minor
    Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 3 hrs to fix

      StaticHashTableTest has 25 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class StaticHashTableTest(BaseLookupTableTest, parameterized.TestCase):
      
        def testStaticHashTable(self, is_anonymous):
          if is_anonymous and not tf2.enabled():
            self.skipTest(SKIP_ANONYMOUS_IN_TF1_REASON)
      Severity: Minor
      Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 2 hrs to fix

        DenseHashTableOpTest has 22 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class DenseHashTableOpTest(test.TestCase):
        
          def testBasic(self, is_anonymous):
            if is_anonymous and not tf2.enabled():
              self.skipTest(SKIP_ANONYMOUS_IN_TF1_REASON)
        Severity: Minor
        Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 2 hrs to fix

          Function testObjectSaveRestore has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def testObjectSaveRestore(self, is_anonymous):
              if is_anonymous and not context.executing_eagerly():
                self.skipTest(SKIP_ANONYMOUS_IN_TF1_REASON)
              save_dir = os.path.join(self.get_temp_dir(), "save_restore")
              save_prefix = os.path.join(tempfile.mkdtemp(prefix=save_dir), "hash")
          Severity: Minor
          Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 1 hr to fix

            Function testSavedModelSaveRestore has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def testSavedModelSaveRestore(self, is_anonymous):
                save_dir = os.path.join(self.get_temp_dir(), "save_restore")
                save_path = os.path.join(tempfile.mkdtemp(prefix=save_dir), "hash")
            
                root = autotrackable.AutoTrackable()
            Severity: Minor
            Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 1 hr to fix

              Function testSavedModelSaveRestore has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def testSavedModelSaveRestore(self, is_anonymous):
                  save_dir = os.path.join(self.get_temp_dir(), "save_restore")
                  save_path = os.path.join(tempfile.mkdtemp(prefix=save_dir), "hash")
              
                  root = autotrackable.AutoTrackable()
              Severity: Minor
              Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 1 hr to fix

                Function testObjectSaveRestore has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def testObjectSaveRestore(self, is_anonymous):
                    if is_anonymous and not context.executing_eagerly():
                      self.skipTest(SKIP_ANONYMOUS_IN_TF1_REASON)
                    save_dir = os.path.join(self.get_temp_dir(), "save_restore")
                    save_prefix = os.path.join(tempfile.mkdtemp(prefix=save_dir), "hash")
                Severity: Minor
                Found in tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py - About 1 hr to fix

                  There are no issues that match your filters.

                  Category
                  Status