Skip to content

Commit d5a62f8

Browse files
author
Brendan Whitfield
committed
fixed tests for new command support system
1 parent 553d748 commit d5a62f8

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

‎tests/test_OBD.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def _test_last_command(self, expected):
6565
0, \
6666
noop, \
6767
ECU.ALL, \
68-
True, \
6968
True)
7069

7170

@@ -109,7 +108,7 @@ def test_supports():
109108
# since we haven't actually connected,
110109
# no commands should be marked as supported
111110
assert not o.supports(obd.commands.RPM)
112-
obd.commands.RPM.supported = True
111+
o.supported_commands.add(obd.commands.RPM)
113112
assert o.supports(obd.commands.RPM)
114113

115114
# commands that aren't in python-OBD's tables are unsupported by default

‎tests/test_OBDCommand.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ def test_constructor():
1818
assert cmd.decode == noop
1919
assert cmd.ecu == ECU.ENGINE
2020
assert cmd.fast == False
21-
assert cmd.supported == False
2221

2322
assert cmd.mode_int == 1
2423
assert cmd.pid_int == 35
2524

2625
# a case where "fast", and "supported" were set explicitly
27-
# name description cmd bytes decoder ECU fast supported
28-
cmd = OBDCommand("Test 2", "example OBD command", "0123", 2, noop, ECU.ENGINE, True, True)
26+
# name description cmd bytes decoder ECU fast
27+
cmd = OBDCommand("Test 2", "example OBD command", "0123", 2, noop, ECU.ENGINE, True)
2928
assert cmd.fast == True
30-
assert cmd.supported == True
3129

3230

3331

@@ -43,7 +41,6 @@ def test_clone():
4341
assert cmd.decode == other.decode
4442
assert cmd.ecu == other.ecu
4543
assert cmd.fast == cmd.fast
46-
assert cmd.supported == cmd.supported
4744

4845

4946

0 commit comments

Comments
 (0)