question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Testcase for _pprint() is not present

See original GitHub issue

Description

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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cmarmocommented, Jul 15, 2022

Solved in #23883. Thanks @lucyleeow !

0reactions
LakshKDcommented, Feb 19, 2019

@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 ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found