-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use toml-test v1.3 and add heterogenous array tests
- Loading branch information
Showing
16 changed files
with
1,145 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM python:3.10.12 | ||
|
||
RUN apt-get update && apt-get install -y fish && \ | ||
pip install -U pip && \ | ||
pip install poetry && \ | ||
poetry config virtualenvs.create false && \ | ||
chsh -s /usr/bin/fish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
// These tasks will run in order when initializing your CodeSandbox project. | ||
"setupTasks": [], | ||
|
||
// These tasks can be run from CodeSandbox. Running one will open a log in the app. | ||
"tasks": { | ||
"poetry update && poetry install": { | ||
"name": "poetry update && poetry install", | ||
"command": "poetry update && poetry install", | ||
"runAtStart": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from typing import Any | ||
from benchwork import BenchCase | ||
|
||
|
||
class BenchCaseDumpsHeteroArray(BenchCase): | ||
def run(self) -> Any: | ||
v1 = { | ||
"v": [1, 1.2, True, "string"] | ||
} | ||
try: | ||
return self.api.dumps(v1) | ||
except Exception as e: | ||
return e | ||
|
||
|
||
class BenchCaseLoadsHeteroArray(BenchCase): | ||
|
||
def run(self) -> Any: | ||
v1 = """ | ||
v = [1, 1.2, true, "string"] | ||
""" | ||
try: | ||
return self.api.loads(v1) | ||
except Exception as e1: | ||
return e1 | ||
|
||
|
||
class BenchCaseDumpsNestedArray(BenchCase): | ||
def run(self) -> Any: | ||
v1 = { | ||
"v": [[1], [1, 2]] | ||
} | ||
try: | ||
return '<pre>' + self.api.dumps(v1) + '</pre>' | ||
except Exception as e: | ||
return e | ||
|
||
|
||
class BenchCaseLoadsNestedArray(BenchCase): | ||
|
||
def run(self) -> Any: | ||
v1 = """ | ||
v = [[1], [1, 2]] | ||
""" | ||
try: | ||
return self.api.loads(v1) | ||
except Exception as e1: | ||
return e1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters