Open drjasonharrison opened 3 years ago
I think you need a tearDown() function because running pytest on the python-tdd-singleton example results in
FAILED tests/my_singleton_test.py::test_singleton_retains_initial_property_values_after_subsequent_init_calls - RuntimeError: Already instantiated! FAILED tests/my_singleton_test.py::test_singleton_instance_is_accessible_using_class_method - RuntimeError: Already instantiated! FAILED tests/my_singleton_test.py::test_singleton_instance_field_is_not_directly_accessible - RuntimeError: Already instantiated!
But they all pass when run independently.
Probably. Those tests were written iteratively (following the blog post), I don't think I've even tried to run them all together (or I would have noticed). Thank you for the suggestion!
I think you need a tearDown() function because running pytest on the python-tdd-singleton example results in
But they all pass when run independently.