Implement a simple inventory management system that allows users to add items, remove items, and check the current inventory status in a predefined structure. The system should be designed with the following requirements:
Create a class named Inventory located in /app/ which should contain:
A private instance variable to hold an object representing the inventory (e.g., a dictionary).
The Inventory class must include the following methods:
add_item(item_name: str, quantity: int) -> None: This method should take the name of the item and the quantity to add to the inventory. If the item already exists, the quantity should be updated accordingly.
remove_item(item_name: str, quantity: int) -> None: This method should remove the specified quantity of the item from the inventory. If the quantity to remove is greater than what exists, simply remove the item from inventory entirely, and if the item doesn't exist, it should handle it gracefully without raising an error.
get_inventory() -> dict: This method should return the current state of the inventory as a dictionary where the keys are item names and the values are their respective quantities.
Ensure that the Inventory class has appropriate error handling:
If a negative quantity is provided in either add_item or remove_item, raise a ValueError with an appropriate message.
Ensure that all methods are covered by unit tests and that they pass successfully. The tests should check for:
Correct addition of items.
Correct removal of items, including scenarios where items are removed entirely or where an error is raised for negative quantities.
The correct representation of the inventory state after multiple updates.
Document the class and its methods with docstrings to ensure clarity on their functionality.
Your implementation should satisfy all these requirements to ensure that the tests pass successfully.