diff --git a/scripts/bench.py b/scripts/bench.py index 99b74f1f..15c0e2b7 100755 --- a/scripts/bench.py +++ b/scripts/bench.py @@ -29,7 +29,11 @@ import subprocess as sp import sys import threading as th import time -import toml + +try: + import tomllib as toml +except ModuleNotFoundError: + import tomli as toml RUNNER_PATH = ['./runners/bench_runner'] @@ -182,7 +186,7 @@ class BenchSuite: # load toml file and parse bench cases with open(self.path) as f: # load benches - config = toml.load(f) + config = toml.load(f.buffer) # find line numbers f.seek(0) diff --git a/scripts/test.py b/scripts/test.py index 3307584e..411d6b65 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -30,7 +30,11 @@ import subprocess as sp import sys import threading as th import time -import toml + +try: + import tomllib as toml +except ModuleNotFoundError: + import tomli as toml RUNNER_PATH = ['./runners/test_runner'] @@ -188,7 +192,7 @@ class TestSuite: # load toml file and parse test cases with open(self.path) as f: # load tests - config = toml.load(f) + config = toml.load(f.buffer) # find line numbers f.seek(0)