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

Refactor Analyzer Tests to Use Sample Solution Files Instead of Multi-Line Strings #24

Open
BethanyG opened this issue Apr 16, 2021 · 1 comment
Assignees
Labels
x:status/claimed Someone is working on this issue

Comments

@BethanyG
Copy link
Member

Per the conversation in PR#22, the test cases as written in test/two-fer/two_fer_test.py are not syntax highlighted and are difficult to scan. In their current multi-line string form, they are also brittle (an extra space or other error will cause failure) and hard to maintain.

Ideally, we'd refactor the tests and testing code to read sample files from a test/samples/ directory, or the test/ directory itself, and compare results with "known good" or "known output" -- similar to this approach in the Python test runner, and this approach in the Ruby Analyzer.

We could also model the test input as Pytest Fixtures, similar to the approach used in the C# Analyzer.

Because the current model is to have a test directory for every analyzer and an analyzer directory for every exercise, it's important we move to a clearer and more modular solution for test files.

@BethanyG BethanyG mentioned this issue Apr 16, 2021
3 tasks
@BethanyG
Copy link
Member Author

Tagging this as part of issue #11 .

@BethanyG BethanyG self-assigned this May 9, 2021
@BethanyG BethanyG added the x:status/claimed Someone is working on this issue label Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:status/claimed Someone is working on this issue
Projects
None yet
Development

No branches or pull requests

1 participant