Skip to content

Commit

Permalink
Change how tests/setup.py is referenced in tests
Browse files Browse the repository at this point in the history
Reviewed By: kinto0

Differential Revision: D51693423

fbshipit-source-id: 2c43962204ece7a0406e59e77f3d7097988ed6ca
  • Loading branch information
grievejia authored and facebook-github-bot committed Nov 30, 2023
1 parent 4756029 commit 7cd8c5c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions client/commands/tests/check_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
configuration,
error,
frontend_configuration,
tests,
)
from ...tests import setup
from .. import check


Expand Down Expand Up @@ -61,10 +61,10 @@ class CheckTest(testslide.TestCase):
def test_create_check_arguments(self) -> None:
with tempfile.TemporaryDirectory() as root:
root_path = Path(root).resolve()
tests.setup.ensure_directories_exists(
setup.ensure_directories_exists(
root_path, [".pyre", "allows", "blocks", "search", "local/src"]
)
tests.setup.write_configuration_file(
setup.write_configuration_file(
root_path,
{
"only_check_paths": ["allows", "nonexistent"],
Expand All @@ -77,7 +77,7 @@ def test_create_check_arguments(self) -> None:
"strict": True,
},
)
tests.setup.write_configuration_file(
setup.write_configuration_file(
root_path, {"source_directories": ["src"]}, relative="local"
)

Expand Down Expand Up @@ -140,9 +140,9 @@ def test_create_check_arguments(self) -> None:
def test_create_check_arguments_artifact_root_no_conflict(self) -> None:
with tempfile.TemporaryDirectory() as root:
root_path = Path(root).resolve()
tests.setup.ensure_directories_exists(root_path, [".pyre", "project"])
tests.setup.ensure_files_exist(root_path, ["project/.buckconfig"])
tests.setup.write_configuration_file(
setup.ensure_directories_exists(root_path, [".pyre", "project"])
setup.ensure_files_exist(root_path, ["project/.buckconfig"])
setup.write_configuration_file(
root_path / "project",
{
"targets": ["//foo:bar"],
Expand Down Expand Up @@ -172,9 +172,9 @@ def test_create_check_arguments_logging(self) -> None:
log_path = root_path / ".pyre"
logger_path = root_path / "logger"

tests.setup.ensure_directories_exists(root_path, [".pyre", "src"])
tests.setup.ensure_files_exist(root_path, ["logger"])
tests.setup.write_configuration_file(
setup.ensure_directories_exists(root_path, [".pyre", "src"])
setup.ensure_files_exist(root_path, ["logger"])
setup.write_configuration_file(
root_path,
{"source_directories": ["src"], "logger": str(logger_path)},
)
Expand Down

0 comments on commit 7cd8c5c

Please sign in to comment.