FaiBarazi / lru_cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LRUCache Implementation

  • Content
  • Setup
  • Interactive shell/test
  • Tests

Content

  • simple_lru: simple LRUCache implementation.
  • requirments: python requirements to run the test.
  • tests: Dir containing tests.
  • pytest.ini: pytest config file.

Setup

  • clone repo and create a virtual env preferably with the name env in place. $python3 -m venv env. To activate the virtual env run $source env/bin/activate
  • Install requirements - mainly to run the tests. $pip install -r requirements.txt. This installs ipython and pytest.

Interactive shell

To run an interactive shell cd to the main repo, activate the virtual env and run ipython. From there you can import the LRUCache class form simple_lru

Running Tests

from the main project repo run pytest tests/tests.py

About


Languages

Language:Python 100.0%