Re: [elixir-core:11730] [Proposal] introduce with_env in ExUnit

2024-03-30 Thread Daniel Kukula
imagine. > > Anyway, hope that helps/gives you some ideas! > > Paul > > On Wed, Mar 27, 2024, at 11:14 AM, Daniel Kukula wrote: > > Currently, tests that use env variables can't be run async because the > environment is shared. My proposal is to introduce a with_env funct

Re: [elixir-core:11727] [Proposal] introduce with_env in ExUnit

2024-03-29 Thread Daniel Kukula
sary. :) > > On Wed, Mar 27, 2024 at 4:14 PM Daniel Kukula wrote: > >> Currently, tests that use env variables can't be run async because the >> environment is shared. My proposal is to introduce a with_env function that >> will accept a function to execute and a mapping

[elixir-core:11725] [Proposal] introduce with_env in ExUnit

2024-03-27 Thread Daniel Kukula
Currently, tests that use env variables can't be run async because the environment is shared. My proposal is to introduce a with_env function that will accept a function to execute and a mapping of params that the functions in System will accept as env variables: Now: System.put_env("PORT",

Re: [elixir-core:11612] [Proposal] String.replace_invalid optionally tread <<0>> as invalid

2023-12-17 Thread Daniel Kukula
ter the fact replacing <<0>> by the replacement > character. > > On Sun, Dec 17, 2023 at 10:43 AM Daniel Kukula wrote: > >> Any chance to have an option to also escape null byte in >> String.replace_invalid ?? >> >> In utf-8 <<0>> is a va

[elixir-core:11610] [Proposal] String.replace_invalid optionally tread <<0>> as invalid

2023-12-17 Thread Daniel Kukula
Any chance to have an option to also escape null byte in String.replace_invalid ?? In utf-8 <<0>> is a valid character but there are problems with it: - it's invalid in modified utf-8 https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8 - postgres does not accept text containing it, you get an

[elixir-core:11605] [Proposal] Add :infinity to Enum.take and Stream.take

2023-12-09 Thread Daniel Kukula
We currently use infinity in multiple places in the standard library, it become a defacto standard in the ecosystem. I think that when passing :infinity to enumerable.take this should make it a noop. Example: list |> Enum.take(:infinity) would return the same list. I'm working on a custom

Re: [elixir-core:11568] [proposal] exunit with umbrella child apps changes

2023-10-21 Thread Daniel Kukula
t; helpful to isolate dependency issues. > > Hope that helps > Cheers > Jon > > On Thu, 19 Oct 2023, at 2:34 PM, Daniel Kukula wrote: > > Hi all, I have 2 proposals when running exunit inside umbrella: > > 1) Automatically add `/test` at the end of path running tests i

[elixir-core:11566] [proposal] exunit with umbrella child apps changes

2023-10-19 Thread Daniel Kukula
Hi all, I have 2 proposals when running exunit inside umbrella: 1) Automatically add `/test` at the end of path running tests in umbrella: `mix test apps/child_app` currently this does not run tests, but it also does not print any warnings about not tests found - I have to specify the test

[elixir-core:11355] Re: [BUG ??] unexpected behaviour when appending tuple to a list

2023-04-28 Thread Daniel Kukula
Looks like it works with any data structure - producing improper lists On Friday, April 28, 2023 at 2:55:34 PM UTC+2 Daniel Kukula wrote: > I accidentaly used Keyword.pop instead of Keyword.take and my code did not > catched it because you can append a tuple to a list - is this ex

[elixir-core:11353] [BUG ??] unexpected behaviour when appending tuple to a list

2023-04-28 Thread Daniel Kukula
I accidentaly used Keyword.pop instead of Keyword.take and my code did not catched it because you can append a tuple to a list - is this expected behaviour ? iex [14:50 :: 1] > [1,2] ++ {3,4} [1, 2 | {3, 4}] iex [14:50 :: 2] > {3,4} ++ [1,2] ** (ArgumentError) argument error