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

Adds tests for divide_cases module with pytest #28

Conversation

AyanSinhaMahapatra
Copy link
Member

Adds extensive FileDriven tests for the module divide_cases for classes
DivideCases and CraftRules following pytest testing conventions
and using commoncode.FileBasedTesting functions.

Signed-off-by: Ayan Sinha Mahapatra [email protected]

@AyanSinhaMahapatra AyanSinhaMahapatra changed the title Tests analyzer Adds tests for divide_cases module with pytest Nov 10, 2020
Using chained indexing in pandas is a source of problems. The pandas
documentation provides some details at:
https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
This commit fixes this by changing functions in
results_analyze/divide_cases.py.
Also updates test related data into folders.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Move functions creating rules to a different Class for tests
organization. Add data IO function to and from hdf5 files
and text/json files for tests.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Add binary HDF5 files and text files containing test data.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Add extensive FileDriven tests for the `divide_cases` module
to test with pytest.
Issue - aboutcode-org#14

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you please use plain text data files such as JSON with some comments on how to re-create them and avoid using hdf5 files? They are hard to recreate and read.

@AyanSinhaMahapatra
Copy link
Member Author

AyanSinhaMahapatra commented Mar 10, 2021

Closing this as the dataframe based analysis is deprecated and is being moved out of src. Files changes would be added here -> #39 instead.

AyanSinhaMahapatra added a commit to AyanSinhaMahapatra/scancode-analyzer that referenced this pull request Mar 17, 2021
Add files to /etc/ from closed PRs which changed them.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
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 this pull request may close these issues.

Inconsistencies in dataframe due to chained_indexing Extensive Tests for scancode-results-analyzer
2 participants