Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testing suites back for processing_repositories.py #96

Open
2 tasks done
willdavidson05 opened this issue Aug 14, 2024 · 0 comments
Open
2 tasks done

Add testing suites back for processing_repositories.py #96

willdavidson05 opened this issue Aug 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@willdavidson05
Copy link
Member

Existing issue check

  • I found no existing issues covering this topic.

Description

The test_processing_repositories.py was removed to allow for certain features to work properly in the CLI. This required removing the .json string for now, which is what the test cases referenced.

Example

old testing suite

def test_process_repo_entropy(repository_paths: dict[str, pathlib.Path]) -> None:
   """
   Testing process_repo_entropy produces the expected JSON output for given repositories.
   """
   for label, repo_path in repository_paths.items():
       # Call the function and get the JSON output
       json_string = process_repo_entropy(str(repo_path))


       # Check that the JSON string is not empty
       assert json_string


       # Load the JSON string into a dictionary
       entropy_data = json.loads(json_string)


       # Check for expected keys in the JSON output
       expected_keys = [
           "repo_path",
           "normalized_total_entropy",
           "number_of_commits",
           "number_of_files",
           "time_range_of_commits",
           "file_level_entropy",
       ]


       # Check if all expected keys are present in the entropy_data
       assert all(key in entropy_data for key in expected_keys)

Would you like to work on a solution for this?

  • Yes I am willing to submit a PR!
@d33bs d33bs added the enhancement New feature or request label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants