Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tests/test_backend_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import unittest
from grid2op.tests.aaa_test_backend_interface import AAATestBackendAPI

from PandaModelsBackend import PandaModelsBackend
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for the repo name and the class name to be camelcase, but shouldn't the import name be lowercase? https://peps.python.org/pep-0008/#package-and-module-names


class TestBackendAPI_PandaModelsBackend(AAATestBackendAPI, unittest.TestCase):
def make_backend(self, detailed_infos_for_cascading_failures=False):
return PandaModelsBackend(detailed_infos_for_cascading_failures=detailed_infos_for_cascading_failures)

# The following tests are skipped as these tests may not relevant for the PandaModelsBackend backend
# in the PandaModelsBackend as PandaPower runnpp doesn't converge but runpm does
def test_17_isolated_gen_stops_computation(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would @unittest.expectedFailure be relevant? https://docs.python.org/3/library/unittest.html#skipping-tests-and-expected-failures it says it's only for failures in the assert, not for failures at RT, so maybe not.

pass

def test_22_islanded_grid_stops_computation(self):
pass

def test_12_modify_gen_pf_getter(self):
pass

# The following tests are skipped as these tests lead to error in Julia
# probably a bug in PandaPower or PandaModels that leads to this error
def test_16_isolated_load_stops_computation(self):
pass

def test_19_isolated_storage_stops_computation(self):
pass

if __name__ == "__main__":
unittest.main()