[go: nahoru, domu]

Skip to content

Commit

Permalink
Test with Python 3.8 on Travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Jan 2, 2020
1 parent 4424933 commit f606ce7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: python
python:
- "2.7"
- "3.6"
- "3.8"

addons:
apt:
Expand Down
32 changes: 16 additions & 16 deletions tests/files/kcd/dump.kcd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<NetworkDefinition xmlns="http://kayak.2codeornot2code.org/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Definition.xsd">
<NetworkDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://kayak.2codeornot2code.org/1.0" xsi:noNamespaceSchemaLocation="Definition.xsd">
<Document version="1.0" />
<Node id="1" name="Node1" />
<Node id="2" name="Node2" />
<Node id="3" name="Node3" />
<Bus name="Bus">
<Message id="0x001" length="5" name="Message1">
<Message id="0x001" name="Message1" length="5">
<Producer>
<NodeRef id="1" />
</Producer>
<Signal name="Signal1" offset="0" />
<Signal length="32" name="Signal2" offset="8">
<Signal name="Signal2" offset="8" length="32">
<Consumer>
<NodeRef id="2" />
<NodeRef id="3" />
Expand All @@ -21,46 +21,46 @@
</LabelSet>
</Signal>
</Message>
<Message id="0x002" interval="100" length="4" name="Message2">
<Message id="0x002" name="Message2" length="4" interval="100">
<Notes>Note message 2.</Notes>
<Producer>
<NodeRef id="2" />
<NodeRef id="3" />
</Producer>
<Multiplex length="2" name="Mux1" offset="16">
<Multiplex name="Mux1" offset="16" length="2">
<MuxGroup count="0">
<Signal length="8" name="Signal1" offset="0" />
<Signal length="8" name="Signal2" offset="8" />
<Signal name="Signal1" offset="0" length="8" />
<Signal name="Signal2" offset="8" length="8" />
</MuxGroup>
<MuxGroup count="1">
<Signal length="8" name="Signal3" offset="0" />
<Signal length="8" name="Signal4" offset="8" />
<Signal name="Signal3" offset="0" length="8" />
<Signal name="Signal4" offset="8" length="8" />
</MuxGroup>
</Multiplex>
<Multiplex name="Mux2" offset="18">
<MuxGroup count="0">
<Signal name="Signal5" offset="19" />
</MuxGroup>
</Multiplex>
<Signal length="12" name="Signal6" offset="20">
<Signal name="Signal6" offset="20" length="12">
<Notes>Note signal 6.</Notes>
<Consumer>
<NodeRef id="1" />
</Consumer>
<Value intercept="-40" max="100" min="0" slope="0.05" type="signed" unit="Cel" />
<Value min="0" max="100" slope="0.05" intercept="-40" unit="Cel" type="signed" />
<LabelSet>
<Label name="init" value="0" />
</LabelSet>
</Signal>
</Message>
<Message format="extended" id="0x003" length="8" name="Message3">
<Signal length="64" name="Signal1" offset="0">
<Message id="0x003" name="Message3" length="8" format="extended">
<Signal name="Signal1" offset="0" length="64">
<Value type="double" />
</Signal>
</Message>
<Message id="0x004" length="5" name="Message4">
<Signal endianess="big" name="Signal1" offset="0" />
<Signal endianess="big" length="12" name="Signal2" offset="15" />
<Message id="0x004" name="Message4" length="5">
<Signal name="Signal1" offset="0" endianess="big" />
<Signal name="Signal2" offset="15" length="12" endianess="big" />
</Message>
</Bus>
</NetworkDefinition>
5 changes: 4 additions & 1 deletion tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -3779,6 +3779,9 @@ def test_as_kcd_string(self):
"""

if sys.version_info < (3, 8):
return

filename = 'tests/files/kcd/dump.kcd'
db = cantools.database.load_file(filename)

Expand Down Expand Up @@ -4661,7 +4664,7 @@ def test_issue_168_upper_case_file_extension(self):

message = db.get_message_by_name('Foo')
self.assertEqual(message.name, 'Foo')

def test_issue_163_dbc_newlines(self):
if sys.version_info[0] < 3:
return
Expand Down

0 comments on commit f606ce7

Please sign in to comment.