Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix NameError: uninitialized constant REXML::Parsers::PullParser #222

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

junaruga
Copy link
Member

This commit fixes the following NameError when running only specific test file test/parse/test_character_reference.rb.

$ ruby test/parse/test_character_reference.rb -v
Loaded suite test/parse/test_character_reference
Started
REXMLTests::TestParseCharacterReference:
  test_hex_precedding_zero:           E
===========================================================================================
Error: test_hex_precedding_zero(REXMLTests::TestParseCharacterReference): NameError: uninitialized constant REXML::Parsers::PullParser
test/parse/test_character_reference.rb:18:in 'REXMLTests::TestParseCharacterReference#test_hex_precedding_zero'
===========================================================================================
: (0.001470)
  test_linear_performance_many_preceding_zeros:       .: (0.033970)

Finished in 0.036068018 seconds.
-------------------------------------------------------------------------------------------
2 tests, 15 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
50% passed
-------------------------------------------------------------------------------------------
55.45 tests/s, 415.88 assertions/s

This commit fixes the following NameError when running only specific test file
test/parse/test_character_reference.rb.

```
$ ruby test/parse/test_character_reference.rb -v
Loaded suite test/parse/test_character_reference
Started
REXMLTests::TestParseCharacterReference:
  test_hex_precedding_zero:           E
===========================================================================================
Error: test_hex_precedding_zero(REXMLTests::TestParseCharacterReference): NameError: uninitialized constant REXML::Parsers::PullParser
test/parse/test_character_reference.rb:18:in 'REXMLTests::TestParseCharacterReference#test_hex_precedding_zero'
===========================================================================================
: (0.001470)
  test_linear_performance_many_preceding_zeros:       .: (0.033970)

Finished in 0.036068018 seconds.
-------------------------------------------------------------------------------------------
2 tests, 15 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
50% passed
-------------------------------------------------------------------------------------------
55.45 tests/s, 415.88 assertions/s
```
@naitoh
Copy link
Contributor

naitoh commented Nov 27, 2024

I think this correction is good. 👍

@kou

Does REXML support operation with the following test commands?

$ ruby test/parse/test_character_reference.rb -v

The documentation seems to only describe the rake test testing method.

After checking out the repo, run `rake test` to run the tests.

@kou kou changed the title Fix NameError: uninitialized constant REXML::Parsers::PullParser. test: Fix NameError: uninitialized constant REXML::Parsers::PullParser Nov 28, 2024
@kou
Copy link
Member

kou commented Nov 28, 2024

This usage isn't actively supported. test/run.rb --location test/parse/test_character_reference.rb or something is preferred.

If we want to support this usage, all our tests should include test/helper.rb and it cares about all preparations.

@kou
Copy link
Member

kou commented Nov 28, 2024

Anyway, I merge this.

@kou kou merged commit 46dd810 into ruby:master Nov 28, 2024
61 checks passed
@naitoh
Copy link
Contributor

naitoh commented Nov 28, 2024

This usage isn't actively supported. test/run.rb --location test/parse/test_character_reference.rb or something is preferred.

If we want to support this usage, all our tests should include test/helper.rb and it cares about all preparations.

I understood.
Thanks.

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.

3 participants