Skip to content

Instantly share code, notes, and snippets.

@melvinkcx
Last active June 30, 2019 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melvinkcx/70a12ed35694695bd335504617182d89 to your computer and use it in GitHub Desktop.
Save melvinkcx/70a12ed35694695bd335504617182d89 to your computer and use it in GitHub Desktop.
Snippet for "Why Refactoring? How to Refactor/Restructure Python Package?" https://hackernoon.com/why-refactoring-how-to-restructure-python-package-51b89aa91987
"""
in tests.py
Simple backward compatibility test case
"""
class ConfigHelperCompatibilityTestCase(unittest.TestCase):
def test_backward_compatibility(self):
try:
from .config import CONFIG_NAME, LOGGING_LEVEL
from .config import get_logging_level
from .config import ConfigHelper
except ImportError as e:
self.fail(e.message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment