Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UnitTesting
#1
when i am writing UnitTesting in Python,inside the test mothed i have initiated the logger ,and altogether i have three tests methods.For the first test method each item is getting logged once .But for the second and third test method ,each item is getting logged twice and thrice respectively.Can any one help me with this.I have used only set up method.can i avoid this using TearDown method ????
Reply
#2
Please post some code so we can see what's going on.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
(Jul-11-2018, 05:31 PM)ichabod801 Wrote: Please post some code so we can see what's going on.
i cant paste the code as it is a client network code

(Jul-11-2018, 06:00 PM)saisankalpj Wrote:
(Jul-11-2018, 05:31 PM)ichabod801 Wrote: Please post some code so we can see what's going on.
i cant paste the code as it is a client network code
it is like
def test1():
add(x,y,logger)
def test2():
add(x,y,logger)

for the first test each item getting logged once
for the second test each item is getting logged twice
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020