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.
Files changed (96) hide show
  1. inewave/__init__.py +1 -1
  2. inewave/nwlistop/__init__.py +20 -0
  3. inewave/nwlistop/desvuh.py +21 -0
  4. inewave/nwlistop/edesvc.py +21 -0
  5. inewave/nwlistop/edesvcm.py +23 -0
  6. inewave/nwlistop/edesvcsin.py +20 -0
  7. inewave/nwlistop/evapo.py +21 -0
  8. inewave/nwlistop/evapom.py +23 -0
  9. inewave/nwlistop/evaporsin.py +20 -0
  10. inewave/nwlistop/ghidr.py +22 -0
  11. inewave/nwlistop/ghidrm.py +22 -0
  12. inewave/nwlistop/ghidrsin.py +18 -0
  13. inewave/nwlistop/hjus.py +21 -0
  14. inewave/nwlistop/hliq.py +21 -0
  15. inewave/nwlistop/hmont.py +21 -0
  16. inewave/nwlistop/mevmin.py +21 -0
  17. inewave/nwlistop/mevminm.py +23 -0
  18. inewave/nwlistop/mevminsin.py +20 -0
  19. inewave/nwlistop/modelos/def.py +1 -1
  20. inewave/nwlistop/modelos/defsin.py +1 -1
  21. inewave/nwlistop/modelos/depminuh.py +1 -1
  22. inewave/nwlistop/modelos/desvuh.py +24 -0
  23. inewave/nwlistop/modelos/dtbmax.py +1 -1
  24. inewave/nwlistop/modelos/dtbmin.py +1 -1
  25. inewave/nwlistop/modelos/dvazmax.py +1 -1
  26. inewave/nwlistop/modelos/edesvc.py +23 -0
  27. inewave/nwlistop/modelos/edesvcm.py +23 -0
  28. inewave/nwlistop/modelos/edesvcsin.py +23 -0
  29. inewave/nwlistop/modelos/evapo.py +23 -0
  30. inewave/nwlistop/modelos/evapom.py +23 -0
  31. inewave/nwlistop/modelos/evaporsin.py +23 -0
  32. inewave/nwlistop/modelos/excessin.py +1 -1
  33. inewave/nwlistop/modelos/fteolm.py +1 -1
  34. inewave/nwlistop/modelos/fteolsin.py +1 -1
  35. inewave/nwlistop/modelos/ghidr.py +26 -0
  36. inewave/nwlistop/modelos/ghidrm.py +24 -0
  37. inewave/nwlistop/modelos/ghidrsin.py +28 -0
  38. inewave/nwlistop/modelos/hjus.py +26 -0
  39. inewave/nwlistop/modelos/hliq.py +26 -0
  40. inewave/nwlistop/modelos/hmont.py +24 -0
  41. inewave/nwlistop/modelos/mevmin.py +23 -0
  42. inewave/nwlistop/modelos/mevminm.py +23 -0
  43. inewave/nwlistop/modelos/mevminsin.py +23 -0
  44. inewave/nwlistop/modelos/vdesviouh.py +26 -0
  45. inewave/nwlistop/modelos/vmort.py +23 -0
  46. inewave/nwlistop/modelos/vmortm.py +23 -0
  47. inewave/nwlistop/modelos/vmortsin.py +23 -0
  48. inewave/nwlistop/vdesviouh.py +21 -0
  49. inewave/nwlistop/vmort.py +21 -0
  50. inewave/nwlistop/vmortm.py +23 -0
  51. inewave/nwlistop/vmortsin.py +20 -0
  52. {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/METADATA +1 -1
  53. {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/RECORD +96 -16
  54. tests/mocks/arquivos/desvuh.py +2014 -0
  55. tests/mocks/arquivos/edesvc.py +2014 -0
  56. tests/mocks/arquivos/edesvcm.py +2014 -0
  57. tests/mocks/arquivos/edesvcsin.py +2014 -0
  58. tests/mocks/arquivos/evapo.py +2014 -0
  59. tests/mocks/arquivos/evapom.py +2014 -0
  60. tests/mocks/arquivos/evaporsin.py +2014 -0
  61. tests/mocks/arquivos/ghidr.py +8014 -0
  62. tests/mocks/arquivos/ghidrm.py +8014 -0
  63. tests/mocks/arquivos/ghidrsin.py +8014 -0
  64. tests/mocks/arquivos/hjus.py +6008 -0
  65. tests/mocks/arquivos/hliq.py +6008 -0
  66. tests/mocks/arquivos/hmont.py +2014 -0
  67. tests/mocks/arquivos/mevmin.py +2014 -0
  68. tests/mocks/arquivos/mevminm.py +2014 -0
  69. tests/mocks/arquivos/mevminsin.py +2014 -0
  70. tests/mocks/arquivos/vdesviouh.py +6014 -0
  71. tests/mocks/arquivos/vmort.py +2014 -0
  72. tests/mocks/arquivos/vmortm.py +2014 -0
  73. tests/mocks/arquivos/vmortsin.py +2014 -0
  74. tests/nwlistop/test_desvuh.py +40 -0
  75. tests/nwlistop/test_edesvc.py +40 -0
  76. tests/nwlistop/test_edesvcm.py +40 -0
  77. tests/nwlistop/test_edesvcsin.py +37 -0
  78. tests/nwlistop/test_evapo.py +40 -0
  79. tests/nwlistop/test_evapom.py +40 -0
  80. tests/nwlistop/test_evaporsin.py +37 -0
  81. tests/nwlistop/test_ghidr.py +40 -0
  82. tests/nwlistop/test_ghidrm.py +40 -0
  83. tests/nwlistop/test_ghidrsin.py +37 -0
  84. tests/nwlistop/test_hjus.py +40 -0
  85. tests/nwlistop/test_hliq.py +40 -0
  86. tests/nwlistop/test_hmont.py +40 -0
  87. tests/nwlistop/test_mevmin.py +40 -0
  88. tests/nwlistop/test_mevminm.py +40 -0
  89. tests/nwlistop/test_mevminsin.py +37 -0
  90. tests/nwlistop/test_vdesviouh.py +40 -0
  91. tests/nwlistop/test_vmort.py +40 -0
  92. tests/nwlistop/test_vmortm.py +40 -0
  93. tests/nwlistop/test_vmortsin.py +37 -0
  94. {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/LICENSE.md +0 -0
  95. {inewave-1.2.2.dist-info → inewave-1.4.0.dist-info}/WHEEL +0 -0
  96. {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.