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 failure due to upstream spelling change: behaviour vs behavior #334

Open
mjpieters opened this issue Jan 8, 2025 · 1 comment · May be fixed by #339
Open

Test failure due to upstream spelling change: behaviour vs behavior #334

mjpieters opened this issue Jan 8, 2025 · 1 comment · May be fixed by #339

Comments

@mjpieters
Copy link

The two expected_schema modules in the tests contain:

        GraphQLDirective(
            name="specifiedBy",
            description="Exposes a URL that specifies the behaviour of this scalar.",
            is_repeatable=False,
            locations=(DirectiveLocation.SCALAR,),
            args={
                "url": GraphQLArgument(
                    GraphQLNonNull(GraphQLString),
                    default_value=Undefined,
                    description="The URL that specifies the behavior of this scalar.",
                    deprecation_reason=None,
                )
            },
        ),

but the graphql-core project adjusted the directive description to use American English, which is part of version 3.2.5.

As a result, main.test_main::test_main_generates_correct_schema_file fails when 3.2.5 is installed, as seen in the CI pipeline here.

@mjpieters
Copy link
Author

mjpieters commented Jan 8, 2025

I see four possible fixes:

  • Update the pin to make 3.2.5 the minimal version
  • Update the pin to exclude 3.2.5. Not as terrible as it sounds; the only change in this release is the spelling change, the other changes are adding Python 3.12 and 3.13 to the CI test matrix and some import reformatting. However, this would also exclude future fixes that might be important.
  • Double the 'expected' files and pick a subset based on the installed version of graphql-core. Not a great option.
  • Update test_main_generates_correct_schema_file to normalise the texts before comparing (adding .replace(" behaviour ", " behavior ") to both sides).

I'd pick the last option here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant