'Testing in pandas library: Why is function style chosen over class based testing?
Why is functional style testing facilitating testing compared to class based testing? Is this just additional library specific functionality or are there any general reasons to adopt functional style testing patterns?
To quote from pandas development guidelines:
pandas existing test structure is mostly class-based, meaning that you will typically find tests wrapped in a class.
class TestReallyCoolFeature:
pass
Going forward, we are moving to a more functional style using the pytest framework, which offers a richer testing framework that will facilitate testing and developing. Thus, instead of writing test classes, we will write test functions like this:
def test_really_cool_feature():
pass
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|