File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616@attr .s
1717class j1939_decoder (object ):
18- string = read_binary (__name__ .rpartition ('.' )[0 ], "j1939.dbc" )
18+ #string = read_binary(__name__.rpartition('.')[0], "j1939.dbc")
19+ with open ( "j1939.dbc" , "rb" ) as fd :
20+ string = fd .read ()
1921 j1939_db = canmatrix .formats .loads_flat (
2022 string , import_type = "dbc" , dbcImportEncoding = "utf8"
2123 )
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def test_arbitration_id_is_instance():
4545 assert frame1 .arbitration_id .id == 42
4646 assert frame2 .arbitration_id .id == 0
4747
48- @pytest .mark .skip (reason = "J1939 functionality is only partially implemented and currently breaks test chain" )
48+ # @pytest.mark.skip(reason="J1939 functionality is only partially implemented and currently breaks test chain")
4949def test_arbitration_id_j1939_direct_setters ():
5050 arb_id = ArbitrationId (0 )
5151 arb_id .pgn = 0xF1AA
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ def test_writing_complex_multiplex():
301301 canmatrix .formats .dump (db , outdbc , "dbc" )
302302 for line in outdbc .getvalue ().decode ('utf8' ).split ('\n ' ):
303303 if "SG_MUL_VAL" in line :
304- return True
304+ return
305305 assert False
306306
307307
@@ -318,7 +318,7 @@ def test_defines_with_special_cars():
318318 matrix = canmatrix .formats .dbc .load (dbc , dbcImportEncoding = "utf8" )
319319 assert matrix .frames [0 ].signals [0 ].attributes ["Accuracy" ] == "+/- 10.2 at 55.1%"
320320
321- @pytest .mark .skip (reason = "J1939 functionality is only partially implemented and currently breaks test chain" )
321+ # @pytest.mark.skip(reason="J1939 functionality is only partially implemented and currently breaks test chain")
322322def test_j1939_frametype ():
323323 dbc = io .BytesIO (textwrap .dedent (u'''\
324324 BU_: someOtherEcu
Original file line number Diff line number Diff line change 99
1010from canmatrix .ArbitrationId import ArbitrationId
1111
12- @pytest .mark .skip (reason = "J1939 functionality is only partially implemented and currently breaks test chain" )
12+ # @pytest.mark.skip(reason="J1939 functionality is only partially implemented and currently breaks test chain")
1313def test_j1939_decoder ():
1414 dbc = io .BytesIO (textwrap .dedent (u'''\
1515 BO_ 2566856834 CM_Requests: 9 CGW
You can’t perform that action at this time.
0 commit comments