{"id":45929,"library":"pytestify","title":"pytestify","description":"A tool to automatically convert Python unittest-style tests to pytest. Current version 1.5.0 supports Python 3.7+. Converts assert methods, TestCase classes, setUp/tearDown, and more. Releases are infrequent, mainly maintenance.","status":"active","version":"1.5.0","language":"python","source_language":"en","source_url":"https://github.com/dannysepler/pytestify","tags":["pytest","unittest","test-conversion","automation"],"install":[{"cmd":"pip install pytestify","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"pytestify is used as a CLI tool, not typically imported in Python code.","symbol":"pytestify","correct":"import pytestify"}],"quickstart":{"code":"# Convert a single file\npytestify my_test_file.py\n\n# Convert a directory recursively\npytestify tests/ --recursive\n\n# See what changes would be made without modifying files (dry run)\npytestify my_test_file.py --dry-run","lang":"bash","description":"Run from command line. Pass files or directories. Use --recursive for directories, --dry-run to preview."},"warnings":[{"fix":"Manually verify conversions, especially edge cases with custom assertions.","message":"pytestify may not correctly handle complex assertions like assertAlmostEqual with custom delta, or assertRaises with custom exceptions. Always review the converted code.","severity":"gotcha","affected_versions":"all"},{"fix":"Always run with --dry-run first, then apply changes with --recursive only after reviewing.","message":"Using --recursive on a large directory without --dry-run can modify many files unexpectedly.","severity":"gotcha","affected_versions":"all"},{"fix":"Inspect converted assertFalse statements to ensure the negation is correct.","message":"pytestify converts assertTrue/assertFalse to `assert` but does not handle the opposite boolean logic correctly in all cases (e.g., assertFalse with complex expressions).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.5.0':16 '3.7':19 'assert':21 'autom':38 'automat':5 'class':24 'convers':37 'convert':6,20 'current':14 'infrequ':30 'main':31 'mainten':32 'method':22 'pytest':13,33 'pytestifi':1 'python':7,18 'releas':28 'setup/teardown':25 'style':10 'support':17 'test':11,36 'test-convers':35 'testcas':23 'tool':3 'unittest':9,34 'unittest-styl':8 'version':15","created_at":"2026-06-07T12:57:25.639566+00:00","updated_at":"2026-06-07T12:57:25.639566+00:00","problems":[{"fix":"Run 'pip install pytestify'","cause":"pytestify is not installed.","error":"ModuleNotFoundError: No module named 'pytestify'"},{"fix":"Upgrade to the latest version: 'pip install --upgrade pytestify'","cause":"Older version of pytestify (pre-1.0.0) did not have the --recursive flag.","error":"pytestify: error: unrecognized arguments: --recursive"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/dannysepler/pytestify","github":"https://github.com/dannysepler/pytestify","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}