aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-10-03 23:18:18 +0100
committerGravatar Chris Lovering <[email protected]>2024-10-06 11:52:44 +0100
commit60e29b1a15a2f026a71114fed7bb2f2f93b2548d (patch)
treebf0dfb384c966d3420b06cae78a272ca60c746e0 /tests
parentRaise error if invalid metabase credentials are used (diff)
Support both Python 3.12 and 3.13 in eval
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/utils/snekbox/test_snekbox.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/bot/exts/utils/snekbox/test_snekbox.py b/tests/bot/exts/utils/snekbox/test_snekbox.py
index 3595d9a67..6a2ab5c24 100644
--- a/tests/bot/exts/utils/snekbox/test_snekbox.py
+++ b/tests/bot/exts/utils/snekbox/test_snekbox.py
@@ -35,8 +35,8 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase):
context_manager = MagicMock()
context_manager.__aenter__.return_value = resp
self.bot.http_session.post.return_value = context_manager
-
- job = EvalJob.from_code("import random").as_version("3.10")
+ py_version = "3.12"
+ job = EvalJob.from_code("import random").as_version(py_version)
self.assertEqual(await self.cog.post_job(job), EvalResult("Hi", 137))
expected = {
@@ -44,9 +44,10 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase):
"files": [
{
"path": "main.py",
- "content": b64encode(b"import random").decode()
+ "content": b64encode(b"import random").decode(),
}
- ]
+ ],
+ "executable_path": f"/snekbin/python/{py_version}/bin/python",
}
self.bot.http_session.post.assert_called_with(
constants.URLs.snekbox_eval_api,