Skip to main content

Home/ Mac Attack/ Group items tagged injection

Rss Feed Group items tagged

Benjamin Bandt-Horn

Python Package Structure with Unit Testing, Injection and Mocking - Dev Notes - 0 views

  • This describes setting up a professional Python project with a real package structure, injection and tests.
  • Since you are intended to run .py files directly, Python projects should not have source (src) or binary (bin) folders
  • For the same reason, the test folder should not be separate.  It should be a package in the main project
  • ...3 more annotations...
  • Example
  • You should specify exactly one class per file.  It makes your code easier to find and read.
  • Injection is essential for unit tests
  •  
    This describes setting up a professional Python project with a real package structure, injection and tests.
Benjamin Bandt-Horn

GuiceBasics - snake-guice - Basic concepts behind the Guice methodology - A simple, lig... - 0 views

  • The Dependency Injection (DI) is an essential pattern when building large systems. It forces classes to be more modular and reusable by making them depend on an interface instead of a concrete class. Simply put classes favor instances passed into the init instead of creating new instances.
  •  
    The Dependency Injection (DI) is an essential pattern when building large systems. It forces classes to be more modular and reusable by making them depend on an interface instead of a concrete class. Simply put classes favor instances passed into the init instead of creating new instances.
1 - 2 of 2
Showing 20 items per page