Just want to know why we can't create quue object inside main function and pass the ref of queue.size fun'c to test function it gives error like required positional argument ... Can you help?
The second argument required will be the value returned by the function size.
assertEqual compares two values, if both match then the test case will pass, otherwise it will fail.
You should write it like this, in main function
defmain():test=TestQueueList()# Testing inside main function
queue1=Queue()queue1.enqueue(5)test.assertEqual(queue1.size(),1)
This will work.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just want to know why we can't create quue object inside main function and pass the ref of queue.size fun'c to test function it gives error like required positional argument ... Can you help?
I'm assuming you didn't add the second argument.
The second argument required will be the value returned by the function size.
assertEqual compares two values, if both match then the test case will pass, otherwise it will fail.
You should write it like this, in main function
This will work.