Skip to content

Commit

Permalink
use explicit core import
Browse files Browse the repository at this point in the history
  • Loading branch information
meksor committed Aug 12, 2024
1 parent 06d1c4e commit 4a609d5
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/core/test_indexset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

import ixmp4
from ixmp4 import IndexSet
from ixmp4.core import IndexSet

from ..utils import create_indexsets_for_run

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest

import ixmp4
from ixmp4 import Model
from ixmp4.core import Model

from ..utils import assert_unordered_equality

Expand Down
3 changes: 2 additions & 1 deletion tests/core/test_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import pytest

import ixmp4
from ixmp4 import DataPoint, Region
from ixmp4 import DataPoint
from ixmp4.core import Region

from ..fixtures import SmallIamcDataset
from ..utils import assert_unordered_equality
Expand Down
3 changes: 2 additions & 1 deletion tests/core/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import pytest

import ixmp4
from ixmp4 import IxmpError, Run
from ixmp4.core import Run
from ixmp4.core.exceptions import IxmpError

from ..fixtures import MediumIamcDataset

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest

import ixmp4
from ixmp4 import Scalar
from ixmp4.core import Scalar

from ..utils import assert_unordered_equality

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest

import ixmp4
from ixmp4 import Scenario
from ixmp4.core import Scenario

from ..utils import assert_unordered_equality

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest

import ixmp4
from ixmp4 import IndexSet, Table
from ixmp4.core import IndexSet, Table

from ..utils import create_indexsets_for_run

Expand Down
6 changes: 3 additions & 3 deletions tests/core/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest

import ixmp4
from ixmp4 import DataPoint, Unit
from ixmp4.core import Unit

from ..fixtures import SmallIamcDataset
from ..utils import assert_unordered_equality
Expand Down Expand Up @@ -42,7 +42,7 @@ def test_delete_unit(self, platform: ixmp4.Platform):
self.small.load_units(platform)

run = platform.runs.create("Model", "Scenario")
run.iamc.add(self.small.annual, type=DataPoint.Type.ANNUAL)
run.iamc.add(self.small.annual, type=ixmp4.DataPoint.Type.ANNUAL)

with pytest.raises(Unit.DeletionPrevented):
platform.units.delete("Unit 1")
Expand Down Expand Up @@ -86,7 +86,7 @@ def test_unit_unknown(self, platform: ixmp4.Platform):

run = platform.runs.create("Model", "Scenario")
with pytest.raises(Unit.NotFound):
run.iamc.add(invalid_data, type=DataPoint.Type.ANNUAL)
run.iamc.add(invalid_data, type=ixmp4.DataPoint.Type.ANNUAL)

def test_list_unit(self, platform: ixmp4.Platform):
units = create_testcase_units(platform)
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest

import ixmp4
from ixmp4 import Variable
from ixmp4.core import Variable

from ..utils import assert_unordered_equality

Expand Down

0 comments on commit 4a609d5

Please sign in to comment.