git_brcal/src/server/tests/test_import_modules.py

87 lines
2.4 KiB
Python

import pytest
def test_import_tqdm_tqdm():
"""tqdm is a neat utility library for simple display of progress in loops"""
from tqdm import tqdm
return
def test_import_numpy():
"""numpy is useful to evaluate multiple entries simultaneously, as boolean operations (e.g., greater than) are efficiently handled"""
import numpy as np
return
def test_import_pandas():
"""pandas is useful to handle dataframes and read from .csv or .json files, which can be collected into joint DataFrame objects"""
import pandas as pd
return
def test_import_flask():
"""flask is a WSGI framework for quick and easy design of web-based applications"""
import flask
from flask import Flask, Blueprint, request
return
def test_import_flask_specific_objects():
"""common flask objects, such as the Flask api object, the Blueprint and requests"""
from flask import Flask, Blueprint, request
return
def test_import_mysql_connector():
"""the 'mysql.connector' Object is used for the BreCal server database"""
import mysql.connector
return
def test_import_pydapper():
"""is a library that provides convenient methods for database related work"""
import pydapper
return
def test_import_webargs():
"""currently used in ~/brecal/src/server/BreCal/api/berths.py"""
import webargs
from webargs.flaskparser import parser
return
def test_import_mashmallow():
"""currently used in ~/brecal/src/server/BreCal/api/shipcalls.py"""
import marshmallow
from marshmallow import Schema, fields
return
def test_import_flask_jwt_extended():
"""currently used in ~/brecal/src/server/BreCal/api/login.py"""
import flask_jwt_extended
from flask_jwt_extended import create_access_token
return
def test_import_pyjwt():
"""currently used in ~/brecal/src/server/BreCal/services/jwt_handler.py"""
import jwt
return
def test_import_bcrypt():
"""currently used in ~/brecal/src/server/BreCal/impl/login.py"""
import bcrypt
return
def test_import_math():
"""math.isclose can be interesting to measure differences between two times (e.g., to ignore milliseconds)"""
import math
math.isclose
return
def test_import_datetime():
"""datetime is the default library for times"""
import datetime
datetime.datetime.now()
return
if __name__=="__main__":
test_import_tqdm_tqdm()
test_import_pandas()
test_import_flask()