Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-daniel committed Sep 20, 2022
1 parent 57fd43a commit 151f581
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/expected/HumanR2022a.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# license: Apache License 2.0
# license url: http://www.apache.org/licenses/LICENSE-2.0
# This is a proto file for Webots for the HumanR2022a
# Extracted from: /home/benja/urdf2webots/tests/sources/gait2392_simbody/urdf/human.urdf
# Extracted from: root://tests/sources/gait2392_simbody/urdf/human.urdf

PROTO HumanR2022a [
field SFVec3f translation 0 0 0
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/MotomanSia20d.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# license: Apache License 2.0
# license url: http://www.apache.org/licenses/LICENSE-2.0
# This is a proto file for Webots for the MotomanSia20d
# Extracted from: /home/benja/urdf2webots/tests/sources/motoman/motoman_sia20d_support/urdf/sia20d.urdf
# Extracted from: root://tests/sources/motoman/motoman_sia20d_support/urdf/sia20d.urdf

PROTO MotomanSia20d [
field SFVec3f translation 0 0 0
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/RobotWithDummyLink.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# license: Apache License 2.0
# license url: http://www.apache.org/licenses/LICENSE-2.0
# This is a proto file for Webots for the RobotWithDummyLink
# Extracted from: /home/benjamin/urdf2webots/tests/sources/RobotWithDummyLink.urdf
# Extracted from: root://tests/sources/RobotWithDummyLink.urdf

PROTO RobotWithDummyLink [
field SFVec3f translation 0 0 0
Expand Down
6 changes: 3 additions & 3 deletions tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from urdf2webots.importer import convertUrdfContent, convertUrdfFile

rootDirectory = os.path.dirname(os.path.dirname(__file__)) + os.path.sep
rootDirectory = os.path.dirname(os.path.dirname(__file__))
testDirectory = os.path.join(rootDirectory, 'tests')
sourceDirectory = os.path.join(testDirectory, 'sources')
resultDirectory = os.path.join(testDirectory, 'results')
Expand Down Expand Up @@ -98,7 +98,7 @@ def setUp(self):
for file in files:
with open(os.path.join(root, file), 'r') as f:
contents = f.read()
contents = contents.replace('root://', rootDirectory)
contents = contents.replace('root://', rootDirectory + os.path.sep)

with open(os.path.join(root, file), 'w') as f:
f.write(contents)
Expand Down Expand Up @@ -153,7 +153,7 @@ def tearDown(self):
for file in files:
with open(os.path.join(root, file), 'r') as f:
contents = f.read()
contents = contents.replace(rootDirectory, 'root://')
contents = contents.replace(rootDirectory + os.path.sep, 'root://')

with open(os.path.join(root, file), 'w') as f:
f.write(contents)
Expand Down

0 comments on commit 151f581

Please sign in to comment.