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

American spellings don't work in config file #75

Closed
brandonchinn178 opened this issue Sep 13, 2023 · 8 comments
Closed

American spellings don't work in config file #75

brandonchinn178 opened this issue Sep 13, 2023 · 8 comments

Comments

@brandonchinn178
Copy link

randomize-execution-order: false doesn't seem to work in the config file, but randomise-execution-order: false does. Is that expected?

@NorfairKing
Copy link
Owner

@brandonchinn178
expected: yes.
PR welcome: also yes. I wouldn't mind supporting both.

FWIW: there's a really good reason why the default is true and you probably want to use sequential instead.
Do you want to show me where you're using sydtest? Maybe I can make a helpful suggestion.

@brandonchinn178
Copy link
Author

I understand why the default is true; in general, I agree that randomizing the test order is good to prevent a implicit dependency on the order of tests.

In my case, all my tests are unit tests and I want the output order to match the order in the source code, to match the spec. It's just aesthetics, so I don't think sequential is the right thing here.

@brandonchinn178
Copy link
Author

brandonchinn178 commented Sep 13, 2023

Also, can you explain why this is expected? I do see this:

(optionalField "randomise-execution-order" "Randomise the execution order of the tests in the test suite")
(optionalField "randomize-execution-order" "American spelling")

And the help text does say it's allowed:

# any of
[ randomise-execution-order: # optional
    # Randomise the execution order of the tests in the test suite
    <boolean>
, randomize-execution-order: # optional
    # American spelling
    <boolean>
]

--no-randomize-execution-order also works, it just doesn't work in the config file

@NorfairKing
Copy link
Owner

@brandonchinn178 It looks like I made two mistakes in one message:

  1. I was supposed to say doNotRandomiseExecutionOrder instead of sequential.
  2. I mistakenly thought the American spelling wasn't supposed to be supported yet.

It also looks like there's an issue with the parsing.
I'm investigating now if it's autodocodec that's broken.

@NorfairKing
Copy link
Owner

@brandonchinn178 I just managed to reproduce this failure. Autodocodec has tests against this, so I'll continue digging.

@NorfairKing
Copy link
Owner

I've added another test to autodocodec and haven't found the issue, but now I think I have an idea what the issue is.

@NorfairKing
Copy link
Owner

I figured out why this happened:

NorfairKing/autodocodec@c8d56ac#diff-d42217527abcf98c817a6d39cb84537548449dbefe2ce1eb569dcc249a935331R1618-R1627

It turns out that I misunderstood (my own) autodocodec API and caused this bug.
I'll have to revisit the autodocodec API to make this kind of issue solveable.

@NorfairKing
Copy link
Owner

This should be fixed now that sydtest uses opt-env-conf.

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

No branches or pull requests

2 participants