/demo-assisted-tests

A demonstration of using ChatGPT to revise code functionality and implement viable tests

Primary LanguagePython

Demo Assisted Tests

A demonstration of using ChatGPT to revise code functionality and implement viable tests.

Files at a glance:

  • original.py -- the original script that was used for a Redis use-case and its potential memory footprint assessment.
  • revised.py -- revised version of original.py using ChatGPT suggestions.
  • unit.test.py -- ChatGPT suggested unit test of one of the functions it extracted in revised.py
  • mock.test.py -- ChatGPT suggested integration test by stubbing the Redis usage with Python's magic mock capability

The ChatGPT interaction (sped up 4x, original video was ~12 minutes in length):

chatgpt-take-my-job-py_4d4wTCIH.mov

Some follow-up interactions for it to revise the mock test:

mock