inewave 1.2.2__py3-none-any.whl → 1.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- inewave/__init__.py +1 -1
- inewave/nwlistop/__init__.py +20 -0
- inewave/nwlistop/desvuh.py +21 -0
- inewave/nwlistop/edesvc.py +21 -0
- inewave/nwlistop/edesvcm.py +23 -0
- inewave/nwlistop/edesvcsin.py +20 -0
- inewave/nwlistop/evapo.py +21 -0
- inewave/nwlistop/evapom.py +23 -0
- inewave/nwlistop/evaporsin.py +20 -0
- inewave/nwlistop/ghidr.py +22 -0
- inewave/nwlistop/ghidrm.py +22 -0
- inewave/nwlistop/ghidrsin.py +18 -0
- inewave/nwlistop/hjus.py +21 -0
- inewave/nwlistop/hliq.py +21 -0
- inewave/nwlistop/hmont.py +21 -0
- inewave/nwlistop/mevmin.py +21 -0
- inewave/nwlistop/mevminm.py +23 -0
- inewave/nwlistop/mevminsin.py +20 -0
- inewave/nwlistop/modelos/def.py +1 -1
- inewave/nwlistop/modelos/defsin.py +1 -1
- inewave/nwlistop/modelos/depminuh.py +1 -1
- inewave/nwlistop/modelos/desvuh.py +24 -0
- inewave/nwlistop/modelos/dtbmax.py +1 -1
- inewave/nwlistop/modelos/dtbmin.py +1 -1
- inewave/nwlistop/modelos/dvazmax.py +1 -1
- inewave/nwlistop/modelos/edesvc.py +23 -0
- inewave/nwlistop/modelos/edesvcm.py +23 -0
- inewave/nwlistop/modelos/edesvcsin.py +23 -0
- inewave/nwlistop/modelos/evapo.py +23 -0
- inewave/nwlistop/modelos/evapom.py +23 -0
- inewave/nwlistop/modelos/evaporsin.py +23 -0
- inewave/nwlistop/modelos/excessin.py +1 -1
- inewave/nwlistop/modelos/fteolm.py +1 -1
- inewave/nwlistop/modelos/fteolsin.py +1 -1
- inewave/nwlistop/modelos/ghidr.py +26 -0
- inewave/nwlistop/modelos/ghidrm.py +24 -0
- inewave/nwlistop/modelos/ghidrsin.py +28 -0
- inewave/nwlistop/modelos/hjus.py +26 -0
- inewave/nwlistop/modelos/hliq.py +26 -0
- inewave/nwlistop/modelos/hmont.py +24 -0
- inewave/nwlistop/modelos/mevmin.py +23 -0
- inewave/nwlistop/modelos/mevminm.py +23 -0
- inewave/nwlistop/modelos/mevminsin.py +23 -0
- inewave/nwlistop/modelos/vdesviouh.py +26 -0
- inewave/nwlistop/modelos/vmort.py +23 -0
- inewave/nwlistop/modelos/vmortm.py +23 -0
- inewave/nwlistop/modelos/vmortsin.py +23 -0
- inewave/nwlistop/vdesviouh.py +21 -0
- inewave/nwlistop/vmort.py +21 -0
- inewave/nwlistop/vmortm.py +23 -0
- inewave/nwlistop/vmortsin.py +20 -0
- {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/METADATA +1 -1
- {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/RECORD +96 -16
- tests/mocks/arquivos/desvuh.py +2014 -0
- tests/mocks/arquivos/edesvc.py +2014 -0
- tests/mocks/arquivos/edesvcm.py +2014 -0
- tests/mocks/arquivos/edesvcsin.py +2014 -0
- tests/mocks/arquivos/evapo.py +2014 -0
- tests/mocks/arquivos/evapom.py +2014 -0
- tests/mocks/arquivos/evaporsin.py +2014 -0
- tests/mocks/arquivos/ghidr.py +8014 -0
- tests/mocks/arquivos/ghidrm.py +8014 -0
- tests/mocks/arquivos/ghidrsin.py +8014 -0
- tests/mocks/arquivos/hjus.py +6008 -0
- tests/mocks/arquivos/hliq.py +6008 -0
- tests/mocks/arquivos/hmont.py +2014 -0
- tests/mocks/arquivos/mevmin.py +2014 -0
- tests/mocks/arquivos/mevminm.py +2014 -0
- tests/mocks/arquivos/mevminsin.py +2014 -0
- tests/mocks/arquivos/vdesviouh.py +6014 -0
- tests/mocks/arquivos/vmort.py +2014 -0
- tests/mocks/arquivos/vmortm.py +2014 -0
- tests/mocks/arquivos/vmortsin.py +2014 -0
- tests/nwlistop/test_desvuh.py +40 -0
- tests/nwlistop/test_edesvc.py +40 -0
- tests/nwlistop/test_edesvcm.py +40 -0
- tests/nwlistop/test_edesvcsin.py +37 -0
- tests/nwlistop/test_evapo.py +40 -0
- tests/nwlistop/test_evapom.py +40 -0
- tests/nwlistop/test_evaporsin.py +37 -0
- tests/nwlistop/test_ghidr.py +40 -0
- tests/nwlistop/test_ghidrm.py +40 -0
- tests/nwlistop/test_ghidrsin.py +37 -0
- tests/nwlistop/test_hjus.py +40 -0
- tests/nwlistop/test_hliq.py +40 -0
- tests/nwlistop/test_hmont.py +40 -0
- tests/nwlistop/test_mevmin.py +40 -0
- tests/nwlistop/test_mevminm.py +40 -0
- tests/nwlistop/test_mevminsin.py +37 -0
- tests/nwlistop/test_vdesviouh.py +40 -0
- tests/nwlistop/test_vmort.py +40 -0
- tests/nwlistop/test_vmortm.py +40 -0
- tests/nwlistop/test_vmortsin.py +37 -0
- {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/LICENSE.md +0 -0
- {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/WHEEL +0 -0
- {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from inewave.nwlistop.vmort import Vmort
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from tests.mocks.mock_open import mock_open
|
|
5
|
+
from unittest.mock import MagicMock, patch
|
|
6
|
+
|
|
7
|
+
from tests.mocks.arquivos.vmort import MockVmort
|
|
8
|
+
|
|
9
|
+
ARQ_TESTE = "./tests/mocks/arquivos/__init__.py"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_atributos_encontrados_vmort():
|
|
13
|
+
m: MagicMock = mock_open(read_data="".join(MockVmort))
|
|
14
|
+
with patch("builtins.open", m):
|
|
15
|
+
n = Vmort.read(ARQ_TESTE)
|
|
16
|
+
assert n.valores is not None
|
|
17
|
+
assert n.valores.iloc[0, 0] == datetime(2020, 1, 1)
|
|
18
|
+
assert n.valores.iloc[-1, -1] == 0.0
|
|
19
|
+
assert n.ree is not None
|
|
20
|
+
assert n.ree == "SUDESTE"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_atributos_nao_encontrados_vmort():
|
|
24
|
+
m: MagicMock = mock_open(read_data="")
|
|
25
|
+
with patch("builtins.open", m):
|
|
26
|
+
n = Vmort.read(ARQ_TESTE)
|
|
27
|
+
assert n.valores is None
|
|
28
|
+
assert n.ree is None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_eq_vmort():
|
|
32
|
+
m: MagicMock = mock_open(read_data="".join(MockVmort))
|
|
33
|
+
with patch("builtins.open", m):
|
|
34
|
+
n1 = Vmort.read(ARQ_TESTE)
|
|
35
|
+
n2 = Vmort.read(ARQ_TESTE)
|
|
36
|
+
assert n1 == n2
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Não deve ter teste de diferença, visto que o atributo é
|
|
40
|
+
# implementado como Lazy Property.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from inewave.nwlistop.vmortm import Vmortm
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from tests.mocks.mock_open import mock_open
|
|
5
|
+
from unittest.mock import MagicMock, patch
|
|
6
|
+
|
|
7
|
+
from tests.mocks.arquivos.vmortm import MockVmortm
|
|
8
|
+
|
|
9
|
+
ARQ_TESTE = "./tests/mocks/arquivos/__init__.py"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_atributos_encontrados_vmortm():
|
|
13
|
+
m: MagicMock = mock_open(read_data="".join(MockVmortm))
|
|
14
|
+
with patch("builtins.open", m):
|
|
15
|
+
n = Vmortm.read(ARQ_TESTE)
|
|
16
|
+
assert n.valores is not None
|
|
17
|
+
assert n.valores.iloc[0, 0] == datetime(2020, 1, 1)
|
|
18
|
+
assert n.valores.iloc[-1, -1] == 0.0
|
|
19
|
+
assert n.submercado is not None
|
|
20
|
+
assert n.submercado == "SUDESTE"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_atributos_nao_encontrados_vmortm():
|
|
24
|
+
m: MagicMock = mock_open(read_data="")
|
|
25
|
+
with patch("builtins.open", m):
|
|
26
|
+
n = Vmortm.read(ARQ_TESTE)
|
|
27
|
+
assert n.valores is None
|
|
28
|
+
assert n.submercado is None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_eq_vmortm():
|
|
32
|
+
m: MagicMock = mock_open(read_data="".join(MockVmortm))
|
|
33
|
+
with patch("builtins.open", m):
|
|
34
|
+
n1 = Vmortm.read(ARQ_TESTE)
|
|
35
|
+
n2 = Vmortm.read(ARQ_TESTE)
|
|
36
|
+
assert n1 == n2
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Não deve ter teste de diferença, visto que o atributo é
|
|
40
|
+
# implementado como Lazy Property.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from inewave.nwlistop.vmortsin import Vmortsin
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from tests.mocks.mock_open import mock_open
|
|
5
|
+
from unittest.mock import MagicMock, patch
|
|
6
|
+
|
|
7
|
+
from tests.mocks.arquivos.vmortsin import MockVmortsin
|
|
8
|
+
|
|
9
|
+
ARQ_TESTE = "./tests/mocks/arquivos/__init__.py"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_atributos_encontrados_vmortsin():
|
|
13
|
+
m: MagicMock = mock_open(read_data="".join(MockVmortsin))
|
|
14
|
+
with patch("builtins.open", m):
|
|
15
|
+
n = Vmortsin.read(ARQ_TESTE)
|
|
16
|
+
assert n.valores is not None
|
|
17
|
+
assert n.valores.iloc[0, 0] == datetime(2020, 1, 1)
|
|
18
|
+
assert n.valores.iloc[-1, -1] == 0.0
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_atributos_nao_encontrados_vmortsin():
|
|
22
|
+
m: MagicMock = mock_open(read_data="")
|
|
23
|
+
with patch("builtins.open", m):
|
|
24
|
+
n = Vmortsin.read(ARQ_TESTE)
|
|
25
|
+
assert n.valores is None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def test_eq_vmortsin():
|
|
29
|
+
m: MagicMock = mock_open(read_data="".join(MockVmortsin))
|
|
30
|
+
with patch("builtins.open", m):
|
|
31
|
+
n1 = Vmortsin.read(ARQ_TESTE)
|
|
32
|
+
n2 = Vmortsin.read(ARQ_TESTE)
|
|
33
|
+
assert n1 == n2
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Não deve ter teste de diferença, visto que o atributo é
|
|
37
|
+
# implementado como Lazy Property.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|