Testcase for _pprint() is not present
See original GitHub issueDescription
I was going through the code and thought to write the Testcase for _pprint function: def _pprint(params, offset=0, printer=repr): “”"Pretty print the dictionary ‘params’
This function is present in this file: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py (line no: 65)
I just want to know that whether I should proceed to write the Testcase or I should remove this function if it’s not in use? Please suggest?
Steps/Code to Reproduce
None
Expected Results
Actual Results
Versions
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Python unittest: How to assert the existence of a file or folder ...
Extending unittest.TestCase with an additional assertion worked best for me. import unittest import pathlib as pl class ...
Read more >PHPUnit Browser test tutorial - Drupal
This tutorial will take you through the basics of PHPUnit Browser testing in Drupal 8+.
Read more >Mocking print() in Unit Tests - Real Python
In this lesson, I'm going to talk about how to mock print() if you're ... It can be difficult to write unit tests...
Read more >Right Way to Test, Mock, and Patch in Python - Medium
On top of this, mock module provides a decorator patch() which handles patching ... not present in list formed by calling dir() on...
Read more >How To Test a Node.js Module with Mocha and Assert
Its constructor() function takes no arguments, therefore we don't need ... test failed there was no tick at the beginning of the test...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved in #23883. Thanks @lucyleeow !
@chkoar I have tried removing _pprint() from base.py but since it is getting referenced in sklearn/model_selection/_split.py, I have tried changing the reference to utils._pprint.py file but you are right there is no function _pprint in that file. So should we drop this idea of removing this _pprint function in base.py or should we move this _pprint function to utils._pprint.py file @jnothman and @chkoar Please provide your comments ?