@@ -12,7 +12,7 @@ def test_gas_unavailable(GPIO, mocksmbus):
1212 from enviroplus import gas
1313 mocksmbus .SMBus (1 ).read_i2c_block_data .side_effect = IOError ("Oh noes!" )
1414 gas ._is_setup = False
15- assert gas .available () == False
15+ assert gas .available () is False
1616
1717 with pytest .raises (RuntimeError ):
1818 gas .read_all ()
@@ -21,21 +21,21 @@ def test_gas_unavailable(GPIO, mocksmbus):
2121def test_gas_available (GPIO , smbus_notimeout ):
2222 from enviroplus import gas
2323 gas ._is_setup = False
24- assert gas .available () == True
24+ assert gas .available () is True
2525
2626
2727def test_gas_read_all (GPIO , smbus ):
2828 from enviroplus import gas
2929 gas ._is_setup = False
3030 result = gas .read_all ()
3131
32- assert type (result .oxidising ) == float
32+ assert isinstance (result .oxidising , float )
3333 assert int (result .oxidising ) == 16641
3434
35- assert type (result .reducing ) == float
35+ assert isinstance (result .reducing , float )
3636 assert int (result .reducing ) == 16727
3737
38- assert type (result .nh3 ) == float
38+ assert isinstance (result .nh3 , float )
3939 assert int (result .nh3 ) == 16813
4040
4141 assert "Oxidising" in str (result )
0 commit comments