Setup testing so that the base test classes can be used by other packages

We need to use the test classes of exposure-lib for all other packages too, so we do not have to setup a setup similar too. We need both classes, because we need to test the other packages on both PostGIS and SpatiaLite and come to the same result. The easiest way to do that is just to use the pre-existing setup of exposure-lib, rather than replicating it. By adding a class TestPostGISExposureInitializer(ExposureInitializerMixin, TestPostGISExposure), we have a base setup ready, without having to put this in the conftests. Also, if something changes in the database setup, it will automatically be added to respective packages.

The Mixin in exposure-initializer:

class ExposureInitializerMixin:
    def test_import_exposure_standard(self, exposure_initializer, filepath):
        ...

    def test_import_exposure_zero_buildings(self):
        ...

We would import the base classes from exposurelib, and add the tests in exposure-initializer like so:

class AbstractExposureInitializer(AbstractExposureTest, ExposureInitializerMixin, ABC):
    NUM_PROCESSORS = 1
    ALLOW_ZERO_BUILDINGS_PER_ASSET = False

    @pytest.fixture
    def exposure_initializer(self, database):
        config = {}  # config parameters
        yield ExposureInitializer(
            database, config, self.NUM_PROCESSORS, self.ALLOW_ZERO_BUILDINGS_PER_ASSET
        )

class TestPostGISExposureInitializer(AbstractExposureInitializer, TestPostGISExposure):
    pass


class TestSpatiaLiteExposureInitializer(AbstractExposureInitializer, TestSpatiaLiteExposure):
    pass

This, we need to change in the __init__.py of the tests

\fyi @all

Edited by Laurens Jozef Nicolaas Oostwegel