ArturSpirin/test_junkie

View on GitHub

Showing 26 of 184 total issues

Avoid deeply nested control flow statements.
Open

                            for param, param_data in class_param_data.items():

                                test_status = param_data["status"]
                                if test_status != TestCategory.SUCCESS:
                                    test_status = "failure"
Severity: Major
Found in test_junkie/reporter/xml_reporter.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if suite_retry_attempt > 1:
                                unsuccessful_tests = suite.get_unsuccessful_tests()
                                LogJunkie.debug("There are {} unsuccessful tests that need to be retried"
                                                .format(len(unsuccessful_tests)))
                                if not unsuccessful_tests:
    Severity: Major
    Found in test_junkie/runner.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              while tests:
                                  for test in list(tests):
      
                                      test_start_time = time.time()  # will use in case of a failure in context of this loop
      
      
      Severity: Major
      Found in test_junkie/runner.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if inspect.getsource(test.get_function_object()) == inspect.getsource(t):
                                    requested = True
                                    break
                            else:
        Severity: Major
        Found in test_junkie/runner.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if data_context == "suites":
                                      details.append("\nSuite: {value} Feature: {feature}"
                                                     .format(value=CliUtils.format_bold_string(primary_key),
                                                             feature=CliUtils.format_bold_string(context["feature"])))
                                  else:
          Severity: Major
          Found in test_junkie/cli/cli_audit.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    for status in TestCategory.ALL:
                                        data_point.update({status: metrics[status]})
                                    data.append(data_point)
            Severity: Major
            Found in test_junkie/reporter/html_reporter.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if test_mapping["thread"].is_alive():
                                              return False
                          return True
              Severity: Major
              Found in test_junkie/parallels.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if Analyzer.is_similar(traceback, key):
                                            self.__analysis["traceback_insights"][key]["similar"].append(test_id)
                            elif traceback and index == 0:
                Severity: Major
                Found in test_junkie/reporter/analyzer.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if len(data["data"]["similar"]) > 0:
                                              tb = Reporter.escape(data["traceback"], quote=True)
                  
                                              analysis.append(
                                                  "{similar_count} test failures due to a similar "
                  Severity: Major
                  Found in test_junkie/reporter/analyzer.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if parse_file(file_path)is True:
                                                    continue
                                for thread in CliRunner.__SCANNER_THREADS:
                    Severity: Major
                    Found in test_junkie/cli/cli_runner.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for i in CliAudit.__SECTIONS:
                                                  if i in context:
                                                      msg = "\t"
                                                      counter = 0
                                                      _sorted_context = sorted(context[i].items(), key=lambda x: x[1])
                      Severity: Major
                      Found in test_junkie/cli/cli_audit.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                for class_param, class_param_data in test_metrics.items():
                                                    for param, param_data in class_param_data.items():
                        
                                                        self.analyzer.analyze(test_id=test_id,
                                                                              tracebacks=list(param_data["tracebacks"]),
                        Severity: Major
                        Found in test_junkie/reporter/html_reporter.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if self.__processor.suite_multithreading() and suite_object.is_parallelized():
                                                          while True:
                                                              if self.__processor.suite_qualifies(suite_object):
                                                                  time.sleep(Limiter.get_suite_throttling())
                                                                  self.__executed_suites.append(suite_object)
                          Severity: Major
                          Found in test_junkie/runner.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    for param, param_data in class_param_data.items():
                                                        if param != "None":
                                                            print("\t    |__ parameter: {parameter}".format(parameter=param))
                                                        for index in range(param_data["retry"]):
                                                            trace = param_data["tracebacks"][index]
                            Severity: Major
                            Found in test_junkie/metrics.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if len(details) >= 5:
                                                          section += details
                                                  if len(section) > 1:
                              Severity: Major
                              Found in test_junkie/cli/cli_audit.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if class_param != "None":
                                                            print("\t  |__ class parameter: {class_parameter}".format(class_parameter=class_param))
                                                        for param, param_data in class_param_data.items():
                                Severity: Major
                                Found in test_junkie/metrics.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if status not in not_defined:
                                                              not_defined.update({status: metrics[status]})
                                                          else:
                                                              not_defined[status] += metrics[status]
                                                  else:
                                  Severity: Major
                                  Found in test_junkie/reporter/html_reporter.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if test.get_function_name() in self.__settings.tests:
                                                                requested = True
                                                                break
                                                else:
                                    Severity: Major
                                    Found in test_junkie/runner.py - About 45 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return can_skip
                                      Severity: Major
                                      Found in test_junkie/objects.py - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                            return False
                                        Severity: Major
                                        Found in test_junkie/objects.py - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language