mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-15 07:25:53 +00:00
Fix tests in python 3.13
This commit is contained in:
@@ -68,7 +68,7 @@ class ArgumentsTest(TestBase):
|
||||
test_args = ["-n", "3", "-k", "date"]
|
||||
with self.assertRaises(SystemExit):
|
||||
arguments.parse(test_args)
|
||||
self.assertRegexpMatches(
|
||||
self.assertRegex(
|
||||
stderr.getvalue(),
|
||||
r"error: the following arguments are required: -m/--model",
|
||||
)
|
||||
@@ -79,7 +79,7 @@ class ArgumentsTest(TestBase):
|
||||
test_args = ["-n", "3", "-m", "SVC"]
|
||||
with self.assertRaises(SystemExit):
|
||||
arguments.parse(test_args)
|
||||
self.assertRegexpMatches(
|
||||
self.assertRegex(
|
||||
stderr.getvalue(),
|
||||
r"error: the following arguments are required: -k/--key",
|
||||
)
|
||||
@@ -114,7 +114,7 @@ class ArgumentsTest(TestBase):
|
||||
test_args = None
|
||||
with self.assertRaises(SystemExit):
|
||||
arguments.parse(test_args)
|
||||
self.assertRegexpMatches(
|
||||
self.assertRegex(
|
||||
stderr.getvalue(),
|
||||
r"error: the following arguments are required: -m/--model, "
|
||||
"-k/--key, --title",
|
||||
|
@@ -6,7 +6,7 @@
|
||||
"kernel": "liblinear",
|
||||
"multiclass_strategy": "ovr"
|
||||
},
|
||||
"v. 1.3.1, Computed on Test on 2022-02-22 at 12:00:00 took 1s"
|
||||
"v. 1.4.0, Computed on Test on 2022-02-22 at 12:00:00 took 1s"
|
||||
],
|
||||
"balloons": [
|
||||
0.625,
|
||||
@@ -15,6 +15,6 @@
|
||||
"kernel": "linear",
|
||||
"multiclass_strategy": "ovr"
|
||||
},
|
||||
"v. 1.3.1, Computed on Test on 2022-02-22 at 12:00:00 took 1s"
|
||||
"v. 1.4.0, Computed on Test on 2022-02-22 at 12:00:00 took 1s"
|
||||
]
|
||||
}
|
@@ -120,7 +120,7 @@ class BeMainTest(TestBase):
|
||||
module.main(parameter)
|
||||
self.assertEqual(msg.exception.code, 2)
|
||||
self.assertEqual(stderr.getvalue(), "")
|
||||
self.assertRegexpMatches(stdout.getvalue(), message)
|
||||
self.assertRegex(stdout.getvalue(), message)
|
||||
|
||||
def test_be_main_best_params_non_existent(self):
|
||||
model = "GBC"
|
||||
|
Reference in New Issue
Block a user