-
Notifications
You must be signed in to change notification settings - Fork 70
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
Update list tests to not need to have the full output in the test #437
Comments
I want to work on this real quick! |
Thanks for the offer to help, @OmarAI2003! |
@OmarAI2003 Can I help too? |
Absolutely @KesharwaniArpita , would love Your help! |
@andrewtavis and @OmarAI2003, Do you think we will need a JSON file containing the languages and their associated data types that dynamically changes once a new language is added(based on a python script)? |
Taking the
This approach could potentially be applied to other functions as well I believe these changes would improve the efficiency and maintainability of our tests. Looking forward to your thoughts @KesharwaniArpita, @andrewtavis ! |
This iss an interesting idea! |
@KesharwaniArpita @OmarAI2003 can I join you guys? |
Yeah, of course! @Khushalsarode, sure! Why not? 😃😉😄 |
Hi @andrewtavis and @OmarAI2003 I have been following the contribution period closely and this issue caught my eye but I didn't really want to interrupt in the contribution period so I wanted to stay put for a while. But I am really curious about this issue. I wanted to know that the arguments we are talking about in this issue, they are in the |
So narrowing down for this issue my idea is generalizing the Also should we update the call structure or expected_calls by defining the necessary and optional datatype checks?
This is more of a general idea I had while thinking about solving this issue which is still open for a discussion. I was thinking if there is any way we can associate a python script with the resource files so that they can be updated dynamically everytime a new language(we can read the folder names or so) is added and also if we can connect both the metadata files(just like |
The cases make sense to me, we can actually divide the languages in these cases for testing. But there will be hardcoding required, am I right? @OmarAI2003 |
May be we can look
|
Thanks @KesharwaniArpita @Khushalsarode for all the great suggestions! I think these ideas are heading in an interesting direction, but they seem more relevant to dynamically checking the language directories or metadata files, which might not be directly aligned with the current issue's focus on simplifying the CLI list tests. Also, this is more related to some ongoing work in the check directoryn around dynamically handling the language paths and metadata (see PRs #385 and #390). For this specific issue, I believe a focus on edge cases and verifying the presence of critical calls without relying on the exact order would address this efficiently. What do you all think about narrowing down the scope to stay within the testing domain for this issue? We could explore the broader automation ideas maybe in the check dir as part of separate tasks. |
Make sense
I also agree to this approach. Let's discuss this with Andrew as well and we can work out the details. Sounds good? |
Fair enough!
I’m sure Andrew will share his thoughts once he’s had a chance to see this. |
What I was getting at here was generally checking the headers and the first line of the output :) Big thing here is that we want people to be able to add a language as easily as possible. So we check that the header is formatted appropriately, and for each we test that the first entry as gotten from the the metadata files is correct. From there we can also check to make sure that the total of the call is the appropriate size. So for languages the first entry now is Arabic. Dynamically get the first value of the output and check that it's formatted correctly, and for the rest ask "Are there as many outputs as there should be?". Let me know if this makes sense! Just trying to keep it robust but simple :) |
Closed by #447 🚀 Thanks, @OmarAI2003! |
Terms
Description
An issue with the current tests of list for the CLI is that they require us to update their arguments every time a new language is added, which is very time consuming. It would be great if we could simplify this and just check the top of the output with say a few
call()
lines.Contribution
Happy to discuss implementation and review when a PR is up 😊
The text was updated successfully, but these errors were encountered: