Skip to content

Use Test Modules in tests instead of Elixir built-in modules#14383

Merged
josevalim merged 2 commits into
elixir-lang:mainfrom
maennchen:jm/test_modules
Apr 7, 2025
Merged

Use Test Modules in tests instead of Elixir built-in modules#14383
josevalim merged 2 commits into
elixir-lang:mainfrom
maennchen:jm/test_modules

Conversation

@maennchen
Copy link
Copy Markdown
Member

Prep for #14343

Comment thread lib/elixir/scripts/path_helpers.exs Outdated
Comment thread lib/elixir/scripts/path_helpers.exs Outdated
Comment thread lib/elixir/test/elixir/test_helper.exs Outdated
Comment thread lib/iex/test/test_helper.exs Outdated
Comment thread lib/iex/test/test_helper.exs
Comment thread lib/elixir/scripts/path_helpers.exs Outdated
Copy link
Copy Markdown
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @maennchen. Sorry I left the comments a bit everywhere but the summary is to not extract PathHelpers to a different module, let's simply defined it for the IEx suite instead, and let's make it automatically purges and deletes modules, so we don't have to explicitly call it every time.

import PathHelpers

write_beam(
defmodule ExampleModule do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to pick another name here to avoid conflicts.

Comment thread lib/elixir/test/elixir/exception_test.exs Outdated
Comment thread lib/elixir/test/elixir/exception_test.exs Outdated
Comment thread lib/elixir/test/elixir/exception_test.exs Outdated
@josevalim josevalim merged commit c0ba8a1 into elixir-lang:main Apr 7, 2025
10 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

@maennchen maennchen deleted the jm/test_modules branch April 7, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants