From 84dca622ef888a16a63cf6edb5f0ebdf9f5b54fd Mon Sep 17 00:00:00 2001 From: bucolucas Date: Tue, 20 Aug 2024 17:05:52 -0500 Subject: [PATCH 1/5] Add pytest and pytest-cov for unit testing and coverage reporting --- requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c8d3df7..b2fc8be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,6 @@ openai==1.41.0 python-dotenv==1.0.1 discord.py==2.4.0 anthropic==0.34.0 -GitPython==3.1.43 \ No newline at end of file +GitPython==3.1.43 +pytest +pytest-cov \ No newline at end of file From 0d7c60a9857775a0fddc003e16a15891db78f04a Mon Sep 17 00:00:00 2001 From: bucolucas Date: Tue, 20 Aug 2024 17:05:59 -0500 Subject: [PATCH 2/5] Create tests/chatgpt directory and __init__.py --- tests/chatgpt/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/chatgpt/__init__.py diff --git a/tests/chatgpt/__init__.py b/tests/chatgpt/__init__.py new file mode 100644 index 0000000..e69de29 From f35439cfd891e0a0f9d5d7fa16eeebec3e29b39c Mon Sep 17 00:00:00 2001 From: bucolucas Date: Tue, 20 Aug 2024 17:06:01 -0500 Subject: [PATCH 3/5] Create tests/claude directory and __init__.py --- tests/claude/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/claude/__init__.py diff --git a/tests/claude/__init__.py b/tests/claude/__init__.py new file mode 100644 index 0000000..e69de29 From c99b075d06a2eae7384bc2d50f801a063b55e63c Mon Sep 17 00:00:00 2001 From: bucolucas Date: Tue, 20 Aug 2024 17:06:03 -0500 Subject: [PATCH 4/5] Create tests/integration directory and __init__.py --- tests/integration/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/integration/__init__.py diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py new file mode 100644 index 0000000..e69de29 From 845d72d4ec3e5a27f9c3a7818b7610a2869fddad Mon Sep 17 00:00:00 2001 From: bucolucas Date: Tue, 20 Aug 2024 17:06:14 -0500 Subject: [PATCH 5/5] Add initial unit tests for BaseTelegramInferenceBot class --- .../claude/test_base_telegram_inference_bot.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/claude/test_base_telegram_inference_bot.py diff --git a/tests/claude/test_base_telegram_inference_bot.py b/tests/claude/test_base_telegram_inference_bot.py new file mode 100644 index 0000000..8aa471f --- /dev/null +++ b/tests/claude/test_base_telegram_inference_bot.py @@ -0,0 +1,17 @@ +import unittest +from base_telegram_inference_bot import BaseTelegramInferenceBot + +class TestBaseTelegramInferenceBot(unittest.TestCase): + def setUp(self): + # Initialize the bot or mock any dependencies here + self.bot = BaseTelegramInferenceBot() + + def test_load_system_prompt(self): + # Example test case for load_system_prompt method + result = self.bot.load_system_prompt() + self.assertIsNotNone(result) # Replace with actual expected result + + # Additional test cases can be added here + +if __name__ == '__main__': + unittest.main()