{"id":25198054,"url":"https://github.com/danedens/py_function_test_generator","last_synced_at":"2025-04-04T17:17:28.750Z","repository":{"id":149879753,"uuid":"586036830","full_name":"DanEdens/py_function_test_generator","owner":"DanEdens","description":"Creates a file called \"tests.py\" with a call to all classes and functions found in the project. the list is only meant to serve as a starting place for writing your tests","archived":false,"fork":false,"pushed_at":"2023-01-06T19:17:37.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T02:41:23.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanEdens.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-06T19:13:31.000Z","updated_at":"2023-03-04T18:00:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc2d587d-fc8b-4521-949d-f269e7c57b5f","html_url":"https://github.com/DanEdens/py_function_test_generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2Fpy_function_test_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2Fpy_function_test_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2Fpy_function_test_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2Fpy_function_test_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanEdens","download_url":"https://codeload.github.com/DanEdens/py_function_test_generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217221,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-10T02:40:40.436Z","updated_at":"2025-04-04T17:17:28.743Z","avatar_url":"https://github.com/DanEdens.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Project Name\n------------\n\nThis project is a tool for finding and modifying lines in Python files that contain the strings \"def\" or \"class\", and writing the modified lines to a file.\nThis readme was generated by AI and may be inaccurate, Updates will follow shortly\n\nRequirements\n------------\n\n- Python 3.6 or higher\n- The `os`, `fnmatch`, and `re` modules\n\nUsage\n-----\n\nTo use the tool, run the `main.py` script with Python:\n\npython UnitTests.py\n\nThis will search for all Python files in the parent folder of the current folder, and find all lines that contain the strings \"def\" or \"class\". The tool will then remove any instances of the strings \"self\" and \" -\u003e WebElement\" from the lines, and write the modified lines to the file `tests.py`. If the file `tests.py` doesn't exist, it will be created.\n\nThe tool will overwrite the contents of the `tests.py` file if it already exists. If you want to append the modified lines to the end of the file instead of overwriting it, you can modify the `write_results` function in the `main.py` script to open the file in append mode instead of write mode.\n\n```python\ndef write_results(modified_strings):\n    # Open the file in append mode\n    with open('tests.py', 'a') as f:\n        # Iterate through the modified strings\n        for s in modified_strings:\n            # Write the string to the file followed by a newline character\n            f.write(s + '\\n')\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanedens%2Fpy_function_test_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanedens%2Fpy_function_test_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanedens%2Fpy_function_test_generator/lists"}