Skip to content

Commit

Permalink
upgrade to v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Oct 28, 2024
1 parent 1732905 commit 16a63ac
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/parametric_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from typing import Callable

import pytest
from codeboxapi import CodeBox
from codeboxapi.schema import CodeBoxFile, CodeBoxOutput
from codeboxapi import CodeBox, RemoteFile
from codeboxapi.types import CodeBoxFile, CodeBoxOutput

AssertFunctionType = Callable[[CodeBoxOutput, list[CodeBoxFile]], bool]
AssertFunctionType = Callable[[CodeBoxOutput, list[RemoteFile]], bool]

code_1 = """
import pandas as pd
Expand Down Expand Up @@ -121,7 +121,9 @@ async def test_boxes_async(
packages: list[str],
capsys: pytest.CaptureFixture,
) -> None:
codeboxes = [CodeBox(local=local) for _ in range(num_samples)]
codeboxes = [
CodeBox(api_key="local" if local else None) for _ in range(num_samples)
]

start_time = time.perf_counter()
tasks = [
Expand Down Expand Up @@ -158,12 +160,10 @@ async def run_async(
[file.name for file in files] + [file.name for file in orginal_files]
) == set([file.name for file in codebox_files])

assert all(
[
package_name in str(await codebox.ainstall(package_name))
for package_name in packages
]
)
assert all([
package_name in str(await codebox.ainstall(package_name))
for package_name in packages
])

output: CodeBoxOutput = await codebox.arun(code)
codebox_files_output = await codebox.alist_files()
Expand Down

0 comments on commit 16a63ac

Please sign in to comment.