[ruby-core:96163] [Ruby master Bug#16361] TestEnv#test_fetch failure

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-83041.20191209125704.e89cecc09abf95ef@ruby-lang.org>
Issue #16361 has been updated by vo.x (Vit Ondruch).


And I can trigger different errors:

~~~
$ make test-all TUST="" TESTS="test/optparse/test_did_you_mean.rb test/ruby/test_env.rb"
fatal: not a git repository (or any of the parent directories): .git
./revision.h unchanged
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" --excludes-dir=./test/excludes --name=!/memory_leak/

# Running tests:

[11/55] TestEnv#test_fetch = 0.00 s               
  1) Failure:
TestEnv#test_fetch [/builddir/ruby-2.7.0-053f78e139/test/ruby/test_env.rb:123]:
[ruby-core:56062] [Feature #8649].
Expected Exception(KeyError) was raised, but the message doesn't match.
<"key not found: \"test\""> expected but was
<"key not found: \"test\"\n" +
"Did you mean?  \"TUST\"\n" +
"               \"TESTS\"">.

Finished tests in 0.025079s, 2193.0325 tests/s, 32177.7674 assertions/s.  
55 tests, 807 assertions, 1 failures, 0 errors, 0 skips

ruby -v: ruby 2.7.0dev (2019-11-22 master 053f78e139) [x86_64-linux]
make: *** [uncommon.mk:780: yes-test-all] Error 1
~~~

----------------------------------------
Bug #16361: TestEnv#test_fetch failure
https://bugs.ruby-lang.org/issues/16361#change-83041

* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-11-22 master f9d20a1bf1) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
I am facing following test suite error:

~~~
  1) Failure:
TestEnv#test_fetch [/builddir/build/BUILD/ruby-2.7.0-f9d20a1bf1/test/ruby/test_env.rb:123]:
[ruby-core:56062] [Feature #8649].
Expected Exception(KeyError) was raised, but the message doesn't match.
<"key not found: \"test\""> expected but was
<"key not found: \"test\"\n" + "Did you mean?  \"TESTS\"">.
~~~

Trying to execute this test independently, it passes just fine. So it seems that the did_you_mean gem is loaded unexpectedly on this place. I just tried:

~~~
mv test/optparse/test_did_you_mean.rb{,.bak}
~~~

since this is the latest addition IMO and the test suite passes just fine.

I am not really sure why it should fail on my setup and it probably does not fail in any other CI. Neither I am sure what would be the best option to fix this. The assertion could be updated to accept this message by simple sed:

~~~
sed -i "/'key not found: \"test\"'/ s/'/\//g" test/ruby/test_env.rb
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.