We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Steps to reproduce the behavior:
structure: project | - src | -- __init__.py | -- main.py | -- test.py
main.py
import sys class Base: def __init__(self, text): self.raw = text def split(self, sep=None, maxsplit=sys.maxsize): return self.raw.split(sep, maxsplit)[0]
test.py
from unittest import TestCase from src.split_main import Base class Test(TestCase): def test_split(self): blob = Base('Beautiful is better') self.assertEqual(blob.split(), ['Beautiful'])
Apply the Inline Method to Base.split().
Expected code after refactoring:
class Base: def __init__(self, text): self.raw = text
import sys from unittest import TestCase from src.split_main import Base class Test(TestCase): def test_split(self): blob = Base('Beautiful is better') self.assertEqual(blob.raw.split(None, sys.maxsize)[0], ['Beautiful'])
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce the behavior:
structure:
project
| - src
| -- __init__.py
| -- main.py
| -- test.py
main.py
test.py
Apply the Inline Method to Base.split().
Expected code after refactoring:
structure:
project
| - src
| -- __init__.py
| -- main.py
| -- test.py
main.py
test.py
The text was updated successfully, but these errors were encountered: