File tree Expand file tree Collapse file tree 1 file changed +8
-36
lines changed Expand file tree Collapse file tree 1 file changed +8
-36
lines changed Original file line number Diff line number Diff line change 44# Authors: https://github.com/open-atmos/PyPartMC/graphs/contributors #
55####################################################################################################
66
7- # TODO #123
8- # pylint: disable=unused-variable
9-
107import pytest
118
12- # import numpy as np
139import PyPartMC as ppmc
1410
1511from .test_gas_data import GAS_DATA_CTOR_ARG_MINIMAL
1814
1915
2016class TestGasState :
21- @staticmethod
22- def test_ctor_error ():
23- # arrange
24- pass
25-
26- # act
27- # try:
28- # sut = ppmc.GasState({'':''})
29- # except ValueError as err:
30- # assert "gas_mixing_ratio" in str(err)
31- # return
32-
33- # assert
34- # assert False
35-
3617 @staticmethod
3718 def test_ctor_valid ():
38- # arrange
19+ # act
3920 sut = ppmc .GasState (GAS_DATA_MINIMAL )
4021
4122 # assert
@@ -49,17 +30,19 @@ def test_get_item_out_of_range(idx):
4930
5031 # act
5132 try :
52- value = sut [idx ]
33+ _ = sut [idx ]
5334 except IndexError :
5435 return
5536
37+ # assert
5638 assert False
5739
5840 @staticmethod
5941 def test_get_item_valid ():
6042 # arrange
6143 sut = ppmc .GasState (GAS_DATA_MINIMAL )
6244 sut [0 ] = 44
45+
6346 # act
6447 value = sut [0 ]
6548
@@ -102,22 +85,11 @@ def test_set_item():
10285
10386 @staticmethod
10487 def test_get_mix_rats ():
105-
88+ # arrange
10689 gas_data = GAS_DATA_MINIMAL
90+
91+ # act
10792 sut = ppmc .GasState (gas_data )
10893
94+ # assert
10995 assert len (sut .mix_rats ) == len (sut )
110-
111-
112- # @staticmethod
113- # def test_to_json():
114- # # arrange
115- # data_in = {} # TODO #123
116- # sut = ppmc.GasState(data_in)
117- #
118- # # act
119- # data_out = str(sut)
120- # print(data_out)
121- #
122- # # assert
123- # # assert data_in == data_out TODO #123
You can’t perform that action at this time.
0 commit comments