Please make sure that the setup meets Python Prerequisites.
-
Clone this project,
cd
inside it. -
Create virtual environment inside
env/
and activate it.python -m virtualenv env # on linux source env/bin/activate # on windows env\Scripts\activate on Windows
NOTE: If you do not wish to activate virtual env, you use
env/bin/python
(orenv\scripts\python
on Windows) instead ofpython
. -
Install pre-build dependencies followed by project itself.
python -m pip install --upgrade -r requirements.txt # it won't actually install this package, so any new changes in project src # will be reflected immediately python -m pip install --upgrade -e ".[dev]"
-
Run Tests.
# provide intended API Server and port addresses vi tests/settings.json python -m pytest tests/tcp/test_tcp_flow_capture.py
-
Please make sure you have
python
andpip
installed on your system.You may have to use
python3
orabsolute path to python executable
depending on Python Installation on system, instead ofpython
.python -m pip --help
Please see pip installation guide, if you don't see a help message.
-
It is recommended that you use a python virtual environment for development.
python -m pip install --upgrade virtualenv
Do not use implicit
coding style
test = None
if (test):
print('test is None')
Do use the explicit
coding style
test = None
if test is not None:
print('test is None')