Skip to content

Commit 82eb06a

Browse files
committed
fix tests path
1 parent f0cdaa5 commit 82eb06a

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

tests/test_arxml.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def test_ecu_extract():
12-
test_file = "../tests/files/arxml/MyECU.ecuc.arxml"
12+
test_file = "tests/files/arxml/MyECU.ecuc.arxml"
1313
db = canmatrix.formats.arxml.load(test_file)['']
1414
assert db.frames is not None
1515
assert len(db.frames) == 2
@@ -18,7 +18,7 @@ def test_ecu_extract():
1818

1919

2020
def test_get_signals_from_container_i_pdu():
21-
test_file = "../tests/files/arxml/ARXMLContainerTest.arxml"
21+
test_file = "tests/files/arxml/ARXMLContainerTest.arxml"
2222
matrix = canmatrix.formats.arxml.load(test_file)
2323
assert matrix["New_CanCluster"].frames[0].signals[0].name == 'Header_ID'
2424
assert matrix["New_CanCluster"].frames[0].signals[1].name == 'Header_DLC'
@@ -28,20 +28,20 @@ def test_get_signals_from_container_i_pdu():
2828

2929

3030
def test_get_signals_from_secured_pdu():
31-
test_file = "../tests/files/arxml/ARXMLSecuredPDUTest.arxml"
31+
test_file = "tests/files/arxml/ARXMLSecuredPDUTest.arxml"
3232
matrix = canmatrix.formats.arxml.load(test_file)
3333
assert matrix["CAN"].frames[0].signals[0].name == 'someTestSignal'
3434
assert matrix["CAN"].frames[0].signals[1].name == 'Signal'
3535

3636

3737
def test_min_max():
38-
test_file = "../tests/files/arxml/ARXML_min_max.arxml"
38+
test_file = "tests/files/arxml/ARXML_min_max.arxml"
3939
matrix = canmatrix.formats.arxml.load(test_file)
4040
assert matrix["New_CanCluster"].frames[0].signals[0].is_signed is False
4141

4242

4343
def test_decode_compu_method_1():
44-
test_file = "../tests/files/arxml/ARXMLCompuMethod1.arxml"
44+
test_file = "tests/files/arxml/ARXMLCompuMethod1.arxml"
4545
ea = canmatrix.formats.arxml.Earxml()
4646
ea.open(test_file)
4747
compu_method = ea.find("COMPU-METHOD")

tests/test_codec.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def tearDown(self):
3535
# self.assertEqual(s4.bitstruct_format(), '>s8')
3636

3737
def test_encode_by_signal_raw_value(self):
38-
test_file = "../tests/files/dbc/test.dbc"
38+
test_file = "tests/files/dbc/test.dbc"
3939
for bus in formats.loadp(test_file).values():
4040
test_frame1 = ArbitrationId(0x123)
4141
data = {
@@ -46,7 +46,7 @@ def test_encode_by_signal_raw_value(self):
4646
assert data_bytes == (0, 0xCA, 0x20, 0, 0, 0, 0, 0)
4747

4848
def test_encode_by_signal_physical_value(self):
49-
test_file = "../tests/files/dbc/test.dbc"
49+
test_file = "tests/files/dbc/test.dbc"
5050
for bus in formats.loadp(test_file).values():
5151
test_frame1 = ArbitrationId(0x123)
5252
data = {
@@ -57,7 +57,7 @@ def test_encode_by_signal_physical_value(self):
5757
assert data_bytes == (0, 0x28, 0x20, 0, 0, 0, 0, 0)
5858

5959
def test_encode_decode_signal_value(self):
60-
test_file = "../tests/files/dbc/test.dbc"
60+
test_file = "tests/files/dbc/test.dbc"
6161
for bus in formats.loadp(test_file).values():
6262
test_frame1 = ArbitrationId(0x123)
6363

@@ -72,7 +72,7 @@ def test_encode_decode_signal_value(self):
7272
assert decoded[k].raw_value == v
7373

7474
def test_encode_decode_signal_value_choice_unicode(self):
75-
test_file = "../tests/files/dbc/test.dbc"
75+
test_file = "tests/files/dbc/test.dbc"
7676
for bus in formats.loadp(test_file).values():
7777
test_frame1 = ArbitrationId(0x123)
7878

@@ -87,7 +87,7 @@ def test_encode_decode_signal_value_choice_unicode(self):
8787
assert decoded[k].signal.values[decoded[k].raw_value] == v
8888

8989
def test_encode_decode_signal_value_choice_str(self):
90-
test_file = "../tests/files/dbc/test.dbc"
90+
test_file = "tests/files/dbc/test.dbc"
9191
for bus in formats.loadp(test_file).values():
9292
test_frame1 = ArbitrationId(0x123)
9393

@@ -102,7 +102,7 @@ def test_encode_decode_signal_value_choice_str(self):
102102
assert decoded[k].signal.values[decoded[k].raw_value] == v
103103

104104
def test_import_export_additional_frame_info(self):
105-
test_file = "../tests/files/dbc/test.dbc"
105+
test_file = "tests/files/dbc/test.dbc"
106106
dbs = formats.loadp(test_file)
107107
tmp_dir = tempfile.mkdtemp()
108108
# for extension in ['csv', 'json']: # json will not export None type

tests/test_frame_encoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from canmatrix.ArbitrationId import ArbitrationId
1010

1111
def load_dbc():
12-
test_file = "../tests/files/dbc/test_frame_decoding.dbc"
12+
test_file = "tests/files/dbc/test_frame_decoding.dbc"
1313
return canmatrix.formats.loadp_flat(test_file)
1414

1515

tests/test_scapy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_scapy_frame_exists():
1919

2020
def test_scapy_muliplexed_frame():
2121
# here = os.path.dirname(os.path.realpath(__file__))
22-
test_file = "../tests/files/dbc/test_frame_decoding.dbc"
22+
test_file = "tests/files/dbc/test_frame_decoding.dbc"
2323
db = canmatrix.formats.loadp_flat(test_file)
2424
outscapy = io.BytesIO()
2525
canmatrix.formats.dump(db, outscapy, "scapy")

tests/test_wireshark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_wireshark_frame_exists():
1818
def test_wireshark_muliplexed_frame():
1919
# here = os.path.dirname(os.path.realpath(__file__))
2020
# db = canmatrix.formats.loadp_flat(os.path.join(here, "test_frame_decoding.dbc"))
21-
test_file = "../tests/files/dbc/test_frame_decoding.dbc"
21+
test_file = "tests/files/dbc/test_frame_decoding.dbc"
2222
db = canmatrix.formats.loadp_flat(test_file)
2323
outlua = io.BytesIO()
2424
canmatrix.formats.dump(db, outlua, "wireshark")

0 commit comments

Comments
 (0)