File: yaml-loader.diff

package info (click to toggle)
openmotor 0.6.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,264 kB
  • sloc: python: 5,273; sh: 28; makefile: 21
file content (22 lines) | stat: -rw-r--r-- 974 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/test/compare.py b/test/compare.py
index 7758790..b93b2bf 100644
--- a/test/compare.py
+++ b/test/compare.py
@@ -71,7 +71,7 @@ def compareAlerts(simRes, pastAlerts):
 def runTests(path):
     print(separator)
     with open(path, 'r') as readLocation:
-        fileData = yaml.load(readLocation)
+        fileData = yaml.load(readLocation, Loader=yaml.Loader)
         print("Running tests for '" + fileData['name'] + "'")
         simRes = runSim(fileData['motor'])
         if 'real' in fileData['data'].keys():
@@ -96,7 +96,7 @@ if len(sys.argv) > 1:
         print("Filtering to category '" + filterCategory + "'")
 print(separator)
 with open('data/tests.yaml', 'r') as readLocation:
-    fileData = yaml.load(readLocation)
+    fileData = yaml.load(readLocation, Loader=yaml.Loader)
     for category in fileData.keys():
         if filterCategory is None or category == filterCategory:
             print("Running tests from category '" + category + "'")