@@ -41,6 +41,7 @@ def test_remote_300K():
4141 assert tbl ['MOLWT' ][0 ] == 18
4242 assert tbl ['TAG' ][0 ] == 18505
4343
44+
4445@pytest .mark .remote_data
4546def test_co_basics ():
4647 tbl = CDMS .get_molecule ('028503' )
@@ -49,15 +50,20 @@ def test_co_basics():
4950 assert tbl ['Q1' ][10 ] == 11
5051 assert tbl ['Q7' ][10 ] == 10
5152 assert tbl ['MOLWT' ][0 ] == 28
52- assert tbl ['TAG' ][0 ] == 28503
53+ assert tbl ['TAG' ][0 ] == - 28503
5354
5455
5556@pytest .mark .remote_data
5657def test_ch3cn_negqn ():
5758 tbl = CDMS .get_molecule ('041501' )
5859 fourtominusthree = tbl [(tbl ['Q1' ] == 4 ) & (tbl ['Q2' ] == - 3 )]
5960 assert len (fourtominusthree ) >= 1
60- assert tbl ['TAG' ][0 ] == 41501
61+
62+ # check specifically for -21, which is encoded as `b1`
63+ twentytwominustwentyone = tbl [(tbl ['Q1' ] == 22 ) & (tbl ['Q2' ] == - 21 )]
64+ assert len (twentytwominustwentyone ) >= 1
65+
66+ assert tbl ['TAG' ][0 ] == - 41501
6167
6268
6369@pytest .mark .remote_data
@@ -103,16 +109,16 @@ def test_molecule_with_parens():
103109
104110 MC = np .ma .core .MaskedConstant ()
105111
106- for col , val in zip (tbl [0 ].colnames , (232588.7246 , 0.2828 , - 4.1005 , 3 , 293.8540 , 445 , 66 ,
107- 506 , 303 , 44 , 14 , 30 , MC , MC , MC , 45 , 13 , 33 , MC , MC , MC , 'H2C(CN)2' , False )):
112+ for col , val in zip (tbl [0 ].colnames , (232588.7246 , 0.2828 , - 4.1005 , 3 , 293.8540 , 445 , 66506 ,
113+ 303 , 44 , 14 , 30 , MC , MC , MC , 45 , 13 , 33 , MC , MC , MC , 'H2C(CN)2' , 66 , False )):
108114 if val is MC :
109115 assert tbl [0 ][col ].mask
110116 else :
111117 assert tbl [0 ][col ] == val
112118
113119 # this test row includes degeneracy = 1225, which covers one of the weird letter-is-number parser cases
114- for col , val in zip (tbl [16 ].colnames , (233373.369 , 10.26 , - 4.8704 , 3 , 1229.0674 , 1125 , 66 ,
115- 506 , 303 , 112 , 10 , 102 , MC , MC , MC , 112 , 9 , 103 , MC , MC , MC , 'H2C(CN)2' , False ),):
120+ for col , val in zip (tbl [16 ].colnames , (233373.369 , 10.26 , - 4.8704 , 3 , 1229.0674 , 1125 , 66506 ,
121+ 303 , 112 , 10 , 102 , MC , MC , MC , 112 , 9 , 103 , MC , MC , MC , 'H2C(CN)2' , 66 , False ),):
116122 if val is MC :
117123 assert tbl [16 ][col ].mask
118124 else :
0 commit comments