datawithsuman commited on
Commit
020feee
·
verified ·
1 Parent(s): 344b3c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -282,7 +282,7 @@ class TestCaseGenerator:
282
 
283
  def generate_response(self, prompt):
284
  response = [
285
- ChatMessage(role="system", content="You are tasked with generating unit test cases, including descriptions and assert statements, for a given function. You will also calculate the test coverage percentage. Follow these instructions carefully:"),
286
  ChatMessage(role="user", content=prompt),
287
  ]
288
  resp = MistralAI(self.model).chat(response)
@@ -297,9 +297,7 @@ class TestCaseGenerator:
297
 
298
  prompt=f""" Your task is to generate unit test cases for this function : \n\n{snippet}\
299
  \n\n Generate between 3 to 8 unique unit test cases. Include couple of edge cases as well.
300
- \n\n Calculate the test case coverage and display in the response.
301
  \n\n All the test cases should have the mandatory assert statement.
302
- \n\n Every test case should be defined as a method inside the class.
303
  \n\n All the test cases should have textual description.
304
  \n\n Politely refuse if the function is not suitable for generating test cases.
305
  \n\n There should be no duplicate and incomplete test case.
 
282
 
283
  def generate_response(self, prompt):
284
  response = [
285
+ ChatMessage(role="system", content="You are tasked with generating unit test cases, including descriptions and assert statements, for a given function. Follow these instructions carefully:"),
286
  ChatMessage(role="user", content=prompt),
287
  ]
288
  resp = MistralAI(self.model).chat(response)
 
297
 
298
  prompt=f""" Your task is to generate unit test cases for this function : \n\n{snippet}\
299
  \n\n Generate between 3 to 8 unique unit test cases. Include couple of edge cases as well.
 
300
  \n\n All the test cases should have the mandatory assert statement.
 
301
  \n\n All the test cases should have textual description.
302
  \n\n Politely refuse if the function is not suitable for generating test cases.
303
  \n\n There should be no duplicate and incomplete test case.