Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 2.13 KB

development.md

File metadata and controls

74 lines (49 loc) · 2.13 KB

Development

Prerequisites

You need to install the following tools:

  • Git
  • Python 3.7 or later, the language used to write all the application code.

Checkout

A step by step series of steps that tell you how to get a development env running.

First, you need to get the project source code:

git clone https://github.com/zmoog/refurbished.git

cd refurbished

Create/activate the virtual environment for this project:

python -m venv venv

source ./venv/bin/activate

Install the project dependencies:

# installs the Python deps
$ pip install -r requirements-*

Set some environment variables and aliases:

export PYTHONPATH=`pwd`:$PYTHONPATH 

Let's run the lambda function locally to see if it's all working!

>>> from refurbished import Store
>>> store = Store('it')
>>> tvs = store.get_appletvs()
>>> 
>>> print(tvs)

Running the tests

The library uses pytest to run all its tests.

Unit and integration tests

You can run the test suite with a single command:

$ pytest tests
======================================================================================================= test session starts ========================================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/mbranca/code/projects/zmoog/refurbished
collected 11 items

tests/test_parser.py .....                                                                                                                                                                                                   [ 45%]
tests/test_refurbished.py ......                                                                                                                                                                                             [100%]

======================================================================================================== 11 passed in 0.76s ========================================================================================================
(