A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Refactor tests into their own directory (#491)
Akshay Agrawalfc984bb82725
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yamlindex 8af0686c3b..8c702d7572 100644--- a/.github/workflows/test.yaml+++ b/.github/workflows/test.yaml@@ -94,4 +94,9 @@ jobs:mypy --config-file pyproject.toml marimo/- name: Testrun: |- pytest -v marimo/ -k "not test_cli"+ pytest -v tests/ -k "not test_cli" --cov=marimo --cov-branch+ - name: Upload coverage reports to Codecov+ if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' }}+ uses: codecov/codecov-action@v3+ env:+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}diff --git a/.github/workflows/test_cli.yaml b/.github/workflows/test_cli.yamlindex 23ac9be3e0..40304056ec 100644--- a/.github/workflows/test_cli.yaml+++ b/.github/workflows/test_cli.yaml@@ -86,4 +86,4 @@ jobs:- name: Test CLIshell: bash- run: pytest -v marimo/_cli/test_cli.py+ run: pytest -v tests/_cli/test_cli.pydiff --git a/pyproject.toml b/pyproject.tomlindex e879cee1ef..7a3bf63472 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -62,6 +62,7 @@ dev = [# have the rust toolchain installed on CI"polars==0.19.12","pytest~=7.4.0",+ "pytest-codecov~=0.5.1","mypy~=1.7.0","ruff~=0.0.275",# For docs@@ -94,6 +95,8 @@ exclude = ["marimo/_smoke_tests","marimo/_test_utils/codegen_data","marimo/_test_utils/_tutorials",+ "tests/_ast/codegen_data",+ "tests/_cli/ipynb_data","frontend","docs","build",@@ -118,8 +121,6 @@ select = ["FA102",# isort"I001",- # copyright notice- "CPY001",]# Never try to fix `F401` (unused imports).@@ -133,8 +134,8 @@ line-length = 79extend-exclude = """(^/examples/*- | ^/marimo/_test_utils/codegen_data/*- | ^/marimo/_test_utils/ipynb_data/*+ | ^/tests/_ast/codegen_data/*+ | ^/tests/_cli/ipynb_data/*| ^/marimo/_tutorials/*| ^/marimo/_smoke_tests/*)@@ -144,8 +145,8 @@ extend-exclude = """strict = trueexclude = ['examples',- 'marimo/_test_utils/codegen_data',- 'marimo/_test_utils/ipynb_data',+ 'tests/_ast/codegen_data',+ 'tests/_cli/ipynb_data','marimo/_tutorials/','marimo/_smoke_tests/',]@@ -158,7 +159,7 @@ ignore_errors = true[tool.pytest.ini_options]minversion = "6.0"-addopts = "-ra -q -v --ignore marimo/_test_utils/"+addopts = "-ra -q -v --ignore tests/_cli/ipynb_data --ignore tests/_ast/codegen_data"testpaths = [- "marimo",+ "tests",]diff --git a/scripts/pycopyright.sh b/scripts/pycopyright.shindex d256651274..f6a0ddf6cf 100755--- a/scripts/pycopyright.sh+++ b/scripts/pycopyright.sh@@ -1,19 +1,12 @@#!/bin/bash-# Directory to scan+# Directories to scandir="marimo"# Counter for updated filescount=0-# Check if directory exists-if [[ ! -d "$dir" ]]; then- echo "Directory does not exist."- exit 1-fi--# Iterate over each Python file excluding "_test_utils" subdirectory, which-# contains data files for tests+# Iterate over each Python file and add copyright notice if it isn't therewhile read filedo# Check if the file does not start with "# Copyright"@@ -28,7 +21,7 @@ domv "$tmp_file" "$file"((count++))fi-done < <(find "$dir" -name "_test_utils" -prune -o -type f -name "*.py" -print)+done < <(find "$dir" -type f -name "*.py" -print)if (( count > 0 )); thenecho "$(tput bold)added copyright notices to $count files$(tput sgr0)"diff --git a/scripts/pyfix.sh b/scripts/pyfix.shindex f2705e8ca7..5dba8976fe 100755--- a/scripts/pyfix.sh+++ b/scripts/pyfix.sh@@ -4,6 +4,8 @@ echo "[fix: copyright]"./scripts/pycopyright.shecho "[fix: ruff]"ruff marimo/ --fix+ruff tests/ --fixecho "[fix: black]"black marimo/+black tests/./scripts/pycheck.shdiff --git a/tests/__init__.py b/tests/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/marimo/_test_utils/codegen_data/test_generate_filecontents.py b/tests/_ast/codegen_data/test_generate_filecontents.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_generate_filecontents.pyrename to tests/_ast/codegen_data/test_generate_filecontents.pydiff --git a/marimo/_test_utils/codegen_data/test_generate_filecontents_shadowed_builtin.py b/tests/_ast/codegen_data/test_generate_filecontents_shadowed_builtin.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_generate_filecontents_shadowed_builtin.pyrename to tests/_ast/codegen_data/test_generate_filecontents_shadowed_builtin.pydiff --git a/marimo/_test_utils/codegen_data/test_generate_filecontents_single_cell.py b/tests/_ast/codegen_data/test_generate_filecontents_single_cell.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_generate_filecontents_single_cell.pyrename to tests/_ast/codegen_data/test_generate_filecontents_single_cell.pydiff --git a/marimo/_test_utils/codegen_data/test_generate_filecontents_unshadowed_builtin.py b/tests/_ast/codegen_data/test_generate_filecontents_unshadowed_builtin.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_generate_filecontents_unshadowed_builtin.pyrename to tests/_ast/codegen_data/test_generate_filecontents_unshadowed_builtin.pydiff --git a/marimo/_test_utils/codegen_data/test_generate_filecontents_with_syntax_error.py b/tests/_ast/codegen_data/test_generate_filecontents_with_syntax_error.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_generate_filecontents_with_syntax_error.pyrename to tests/_ast/codegen_data/test_generate_filecontents_with_syntax_error.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_comment_after_sig.py b/tests/_ast/codegen_data/test_get_codes_comment_after_sig.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_comment_after_sig.pyrename to tests/_ast/codegen_data/test_get_codes_comment_after_sig.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_empty.py b/tests/_ast/codegen_data/test_get_codes_empty.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_empty.pyrename to tests/_ast/codegen_data/test_get_codes_empty.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_messy.py b/tests/_ast/codegen_data/test_get_codes_messy.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_messy.pyrename to tests/_ast/codegen_data/test_get_codes_messy.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_multiline_fndef.py b/tests/_ast/codegen_data/test_get_codes_multiline_fndef.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_multiline_fndef.pyrename to tests/_ast/codegen_data/test_get_codes_multiline_fndef.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_multiline_string.py b/tests/_ast/codegen_data/test_get_codes_multiline_string.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_multiline_string.pyrename to tests/_ast/codegen_data/test_get_codes_multiline_string.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_single_line_fn.py b/tests/_ast/codegen_data/test_get_codes_single_line_fn.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_single_line_fn.pyrename to tests/_ast/codegen_data/test_get_codes_single_line_fn.pydiff --git a/marimo/_test_utils/codegen_data/test_get_codes_with_name_error.py b/tests/_ast/codegen_data/test_get_codes_with_name_error.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_get_codes_with_name_error.pyrename to tests/_ast/codegen_data/test_get_codes_with_name_error.pydiff --git a/marimo/_test_utils/codegen_data/test_long_line_in_main.py b/tests/_ast/codegen_data/test_long_line_in_main.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_long_line_in_main.pyrename to tests/_ast/codegen_data/test_long_line_in_main.pydiff --git a/marimo/_test_utils/codegen_data/test_main.py b/tests/_ast/codegen_data/test_main.pysimilarity index 100%rename from marimo/_test_utils/codegen_data/test_main.pyrename to tests/_ast/codegen_data/test_main.pydiff --git a/marimo/_ast/test_app.py b/tests/_ast/test_app.pysimilarity index 100%rename from marimo/_ast/test_app.pyrename to tests/_ast/test_app.pydiff --git a/marimo/_ast/test_app_cell.py b/tests/_ast/test_app_cell.pysimilarity index 100%rename from marimo/_ast/test_app_cell.pyrename to tests/_ast/test_app_cell.pydiff --git a/marimo/_ast/test_cell.py b/tests/_ast/test_cell.pysimilarity index 100%rename from marimo/_ast/test_cell.pyrename to tests/_ast/test_cell.pydiff --git a/marimo/_ast/test_codegen.py b/tests/_ast/test_codegen.pysimilarity index 97%rename from marimo/_ast/test_codegen.pyrename to tests/_ast/test_codegen.pyindex 038186f913..dc27a9d1e6 100644--- a/marimo/_ast/test_codegen.py+++ b/tests/_ast/test_codegen.py@@ -15,9 +15,7 @@ DIR_PATH = os.path.dirname(os.path.realpath(__file__))def get_expected_filecontents(name: str) -> str:- with open(- os.path.join(DIR_PATH, f"../_test_utils/codegen_data/{name}.py"), "r"- ) as f:+ with open(os.path.join(DIR_PATH, f"codegen_data/{name}.py"), "r") as f:contents = f.read()lines = contents.split("\n")break_index = None@@ -34,7 +32,7 @@ def get_expected_filecontents(name: str) -> str:def get_filepath(name: str) -> str:- return os.path.join(DIR_PATH, f"../_test_utils/codegen_data/{name}.py")+ return os.path.join(DIR_PATH, f"codegen_data/{name}.py")def generate_filecontents(@@ -231,7 +229,7 @@ class TestGetCodes:class TestApp:@staticmethoddef test_run() -> None:- import marimo._test_utils.codegen_data.test_main as mod+ import codegen_data.test_main as modoutputs, defs = mod.app.run()assert outputs == (None, "z", None)diff --git a/marimo/_ast/test_visitor.py b/tests/_ast/test_visitor.pysimilarity index 100%rename from marimo/_ast/test_visitor.pyrename to tests/_ast/test_visitor.pydiff --git a/marimo/_test_utils/ipynb_data/arithmetic.ipynb.txt b/tests/_cli/ipynb_data/arithmetic.ipynb.txtsimilarity index 100%rename from marimo/_test_utils/ipynb_data/arithmetic.ipynb.txtrename to tests/_cli/ipynb_data/arithmetic.ipynb.txtdiff --git a/marimo/_test_utils/ipynb_data/blank.ipynb.txt b/tests/_cli/ipynb_data/blank.ipynb.txtsimilarity index 100%rename from marimo/_test_utils/ipynb_data/blank.ipynb.txtrename to tests/_cli/ipynb_data/blank.ipynb.txtdiff --git a/marimo/_test_utils/ipynb_data/markdown.ipynb.txt b/tests/_cli/ipynb_data/markdown.ipynb.txtsimilarity index 100%rename from marimo/_test_utils/ipynb_data/markdown.ipynb.txtrename to tests/_cli/ipynb_data/markdown.ipynb.txtdiff --git a/marimo/_test_utils/ipynb_data/unparsable.ipynb.txt b/tests/_cli/ipynb_data/unparsable.ipynb.txtsimilarity index 100%rename from marimo/_test_utils/ipynb_data/unparsable.ipynb.txtrename to tests/_cli/ipynb_data/unparsable.ipynb.txtdiff --git a/marimo/_cli/test_cli.py b/tests/_cli/test_cli.pysimilarity index 100%rename from marimo/_cli/test_cli.pyrename to tests/_cli/test_cli.pydiff --git a/marimo/_cli/test_envinfo.py b/tests/_cli/test_envinfo.pysimilarity index 100%rename from marimo/_cli/test_envinfo.pyrename to tests/_cli/test_envinfo.pydiff --git a/marimo/_cli/test_file_path.py b/tests/_cli/test_file_path.pysimilarity index 100%rename from marimo/_cli/test_file_path.pyrename to tests/_cli/test_file_path.pydiff --git a/marimo/_cli/test_ipynb_to_marimo.py b/tests/_cli/test_ipynb_to_marimo.pysimilarity index 96%rename from marimo/_cli/test_ipynb_to_marimo.pyrename to tests/_cli/test_ipynb_to_marimo.pyindex 4091470c0d..ec600fd9d6 100644--- a/marimo/_cli/test_ipynb_to_marimo.py+++ b/tests/_cli/test_ipynb_to_marimo.py@@ -14,7 +14,7 @@ DIR_PATH = os.path.dirname(os.path.realpath(__file__))def get_codes(ipynb_name: str) -> tuple[Sequence[str], Sequence[str]]:contents = convert_from_path(- DIR_PATH + f"/../_test_utils/ipynb_data/{ipynb_name}.ipynb.txt"+ DIR_PATH + f"/ipynb_data/{ipynb_name}.ipynb.txt")tempfile_name = ""diff --git a/marimo/_cli/test_upgrade.py b/tests/_cli/test_upgrade.pysimilarity index 100%rename from marimo/_cli/test_upgrade.pyrename to tests/_cli/test_upgrade.pydiff --git a/marimo/_config/test_config.py b/tests/_config/test_config.pysimilarity index 100%rename from marimo/_config/test_config.pyrename to tests/_config/test_config.pydiff --git a/marimo/_messaging/test_ops.py b/tests/_messaging/test_ops.pysimilarity index 100%rename from marimo/_messaging/test_ops.pyrename to tests/_messaging/test_ops.pydiff --git a/marimo/_output/test_builder.py b/tests/_output/test_builder.pysimilarity index 100%rename from marimo/_output/test_builder.pyrename to tests/_output/test_builder.pydiff --git a/marimo/_plugins/core/test_media.py b/tests/_plugins/core/test_media.pysimilarity index 100%rename from marimo/_plugins/core/test_media.pyrename to tests/_plugins/core/test_media.pydiff --git a/marimo/_plugins/core/test_web_component.py b/tests/_plugins/core/test_web_component.pysimilarity index 100%rename from marimo/_plugins/core/test_web_component.pyrename to tests/_plugins/core/test_web_component.pydiff --git a/marimo/_plugins/stateless/status/test_progress.py b/tests/_plugins/stateless/status/test_progress.pysimilarity index 100%rename from marimo/_plugins/stateless/status/test_progress.pyrename to tests/_plugins/stateless/status/test_progress.pydiff --git a/marimo/_plugins/stateless/test_flex.py b/tests/_plugins/stateless/test_flex.pysimilarity index 100%rename from marimo/_plugins/stateless/test_flex.pyrename to tests/_plugins/stateless/test_flex.pydiff --git a/marimo/_runtime/test_image.py b/tests/_plugins/stateless/test_image.pysimilarity index 97%rename from marimo/_runtime/test_image.pyrename to tests/_plugins/stateless/test_image.pyindex c952809ab4..ed699e4c1e 100644--- a/marimo/_runtime/test_image.py+++ b/tests/_plugins/stateless/test_image.py@@ -1,8 +1,8 @@# Copyright 2023 Marimo. All rights reserved.from marimo._plugins.stateless.image import image-from marimo._runtime.conftest import ExecReqProviderfrom marimo._runtime.context import get_contextfrom marimo._runtime.runtime import Kernel+from tests.conftest import ExecReqProviderdef test_image() -> None:diff --git a/marimo/_runtime/test_ui_element_registration.py b/tests/_plugins/ui/_core/test_ui_element_registration.pysimilarity index 95%rename from marimo/_runtime/test_ui_element_registration.pyrename to tests/_plugins/ui/_core/test_ui_element_registration.pyindex 778c5136e9..0a8eb1e3cf 100644--- a/marimo/_runtime/test_ui_element_registration.py+++ b/tests/_plugins/ui/_core/test_ui_element_registration.py@@ -1,9 +1,9 @@# Copyright 2023 Marimo. All rights reserved.from __future__ import annotations-from marimo._runtime.conftest import ExecReqProviderfrom marimo._runtime.context import get_contextfrom marimo._runtime.runtime import Kernel+from tests.conftest import ExecReqProvider# TODO: colocate test with UIElementRegistry file; requires refactoringdiff --git a/marimo/_plugins/ui/_impl/dataframes/test_handlers.py b/tests/_plugins/ui/_impl/dataframes/test_handlers.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/dataframes/test_handlers.pyrename to tests/_plugins/ui/_impl/dataframes/test_handlers.pydiff --git a/marimo/_plugins/ui/_impl/dataframes/test_transforms.py b/tests/_plugins/ui/_impl/dataframes/test_transforms.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/dataframes/test_transforms.pyrename to tests/_plugins/ui/_impl/dataframes/test_transforms.pydiff --git a/marimo/_plugins/ui/_impl/test_altair_chart.py b/tests/_plugins/ui/_impl/test_altair_chart.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/test_altair_chart.pyrename to tests/_plugins/ui/_impl/test_altair_chart.pydiff --git a/marimo/_plugins/ui/_impl/test_array.py b/tests/_plugins/ui/_impl/test_array.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/test_array.pyrename to tests/_plugins/ui/_impl/test_array.pydiff --git a/marimo/_plugins/ui/_impl/test_batch.py b/tests/_plugins/ui/_impl/test_batch.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/test_batch.pyrename to tests/_plugins/ui/_impl/test_batch.pydiff --git a/marimo/_plugins/ui/_impl/test_dictionary.py b/tests/_plugins/ui/_impl/test_dictionary.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/test_dictionary.pyrename to tests/_plugins/ui/_impl/test_dictionary.pydiff --git a/marimo/_plugins/ui/_impl/test_input.py b/tests/_plugins/ui/_impl/test_input.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/test_input.pyrename to tests/_plugins/ui/_impl/test_input.pydiff --git a/marimo/_plugins/ui/_impl/test_table.py b/tests/_plugins/ui/_impl/test_table.pysimilarity index 97%rename from marimo/_plugins/ui/_impl/test_table.pyrename to tests/_plugins/ui/_impl/test_table.pyindex 6c85197752..2e5b4d2f51 100644--- a/marimo/_plugins/ui/_impl/test_table.py+++ b/tests/_plugins/ui/_impl/test_table.py@@ -7,8 +7,8 @@ from marimo._plugins.ui._impl.table import (_normalize_data,)from marimo._plugins.ui._impl.utils.dataframe import TableData-from marimo._runtime.conftest import MockedKernelfrom marimo._runtime.runtime import ExecutionContext+from tests.conftest import MockedKerneldef test_normalize_data() -> None:diff --git a/marimo/_plugins/ui/_impl/utils/test_dataframe.py b/tests/_plugins/ui/_impl/utils/test_dataframe.pysimilarity index 100%rename from marimo/_plugins/ui/_impl/utils/test_dataframe.pyrename to tests/_plugins/ui/_impl/utils/test_dataframe.pydiff --git a/marimo/_runtime/output/test_output.py b/tests/_runtime/output/test_output.pysimilarity index 93%rename from marimo/_runtime/output/test_output.pyrename to tests/_runtime/output/test_output.pyindex 644b54f8f2..f7f383d32b 100644--- a/marimo/_runtime/output/test_output.py+++ b/tests/_runtime/output/test_output.py@@ -1,7 +1,7 @@# Copyright 2023 Marimo. All rights reserved.from __future__ import annotations-from marimo._runtime.conftest import ExecReqProvider, MockedKernel+from tests.conftest import ExecReqProvider, MockedKerneldef test_spinner_removed(diff --git a/marimo/_runtime/test_capture.py b/tests/_runtime/test_capture.pysimilarity index 98%rename from marimo/_runtime/test_capture.pyrename to tests/_runtime/test_capture.pyindex 78c2e2d07e..e8e325e098 100644--- a/marimo/_runtime/test_capture.py+++ b/tests/_runtime/test_capture.py@@ -4,7 +4,7 @@ from __future__ import annotationsimport refrom typing import Any, Dict, Tuple-from marimo._runtime.conftest import ExecReqProvider, MockedKernel+from tests.conftest import ExecReqProvider, MockedKerneldef _has_output(diff --git a/marimo/_runtime/test_cell_runner.py b/tests/_runtime/test_cell_runner.pysimilarity index 90%rename from marimo/_runtime/test_cell_runner.pyrename to tests/_runtime/test_cell_runner.pyindex 7e687061ee..9687e2064c 100644--- a/marimo/_runtime/test_cell_runner.py+++ b/tests/_runtime/test_cell_runner.py@@ -1,7 +1,7 @@# Copyright 2023 Marimo. All rights reserved.from marimo._runtime.cell_runner import Runner-from marimo._runtime.conftest import ExecReqProviderfrom marimo._runtime.runtime import Kernel+from tests.conftest import ExecReqProviderdef test_cell_output(k: Kernel, exec_req: ExecReqProvider) -> None:diff --git a/marimo/_runtime/test_control_flow.py b/tests/_runtime/test_control_flow.pysimilarity index 100%rename from marimo/_runtime/test_control_flow.pyrename to tests/_runtime/test_control_flow.pydiff --git a/marimo/_runtime/test_dataflow.py b/tests/_runtime/test_dataflow.pysimilarity index 100%rename from marimo/_runtime/test_dataflow.pyrename to tests/_runtime/test_dataflow.pydiff --git a/marimo/_runtime/test_runtime.py b/tests/_runtime/test_runtime.pysimilarity index 99%rename from marimo/_runtime/test_runtime.pyrename to tests/_runtime/test_runtime.pyindex 4605e22d74..a184928ef8 100644--- a/marimo/_runtime/test_runtime.py+++ b/tests/_runtime/test_runtime.py@@ -10,7 +10,6 @@ from marimo._messaging.errors import (MultipleDefinitionError,)from marimo._plugins.ui._core.ids import IDProvider-from marimo._runtime.conftest import ExecReqProviderfrom marimo._runtime.dataflow import Edgefrom marimo._runtime.requests import (CreationRequest,@@ -20,6 +19,7 @@ from marimo._runtime.requests import (SetUIElementValueRequest,)from marimo._runtime.runtime import Kernel+from tests.conftest import ExecReqProviderdef _check_edges(error: Error, expected_edges: Sequence[Edge]) -> None:diff --git a/marimo/_runtime/test_state.py b/tests/_runtime/test_state.pysimilarity index 98%rename from marimo/_runtime/test_state.pyrename to tests/_runtime/test_state.pyindex 82f6b77409..2d6ca1f9ca 100644--- a/marimo/_runtime/test_state.py+++ b/tests/_runtime/test_state.py@@ -1,6 +1,6 @@# Copyright 2023 Marimo. All rights reserved.-from marimo._runtime.conftest import ExecReqProviderfrom marimo._runtime.runtime import Kernel+from tests.conftest import ExecReqProviderdef test_set_and_get_state(k: Kernel, exec_req: ExecReqProvider) -> None:diff --git a/marimo/_runtime/test_validate_graph.py b/tests/_runtime/test_validate_graph.pysimilarity index 100%rename from marimo/_runtime/test_validate_graph.pyrename to tests/_runtime/test_validate_graph.pydiff --git a/marimo/_runtime/test_virtual_file.py b/tests/_runtime/test_virtual_file.pysimilarity index 99%rename from marimo/_runtime/test_virtual_file.pyrename to tests/_runtime/test_virtual_file.pyindex 3d992fdaba..31d0dd7444 100644--- a/marimo/_runtime/test_virtual_file.py+++ b/tests/_runtime/test_virtual_file.py@@ -1,10 +1,10 @@# Copyright 2023 Marimo. All rights reserved.from __future__ import annotations-from marimo._runtime.conftest import ExecReqProviderfrom marimo._runtime.context import get_contextfrom marimo._runtime.requests import DeleteRequestfrom marimo._runtime.runtime import Kernel+from tests.conftest import ExecReqProviderdef test_virtual_file_creation(k: Kernel, exec_req: ExecReqProvider) -> None:diff --git a/marimo/_utils/test_flatten.py b/tests/_utils/test_flatten.pysimilarity index 100%rename from marimo/_utils/test_flatten.pyrename to tests/_utils/test_flatten.pydiff --git a/marimo/_utils/test_parse_dataclass.py b/tests/_utils/test_parse_dataclass.pysimilarity index 100%rename from marimo/_utils/test_parse_dataclass.pyrename to tests/_utils/test_parse_dataclass.pydiff --git a/marimo/_runtime/conftest.py b/tests/conftest.pysimilarity index 100%rename from marimo/_runtime/conftest.pyrename to tests/conftest.py