Hi,
Usually when we test things we create many test_myfeature_foobar.py
, test_myfeature_foobar2.py
and so on to test the code and the coverage.
In my case I use pytest, and we asked me to test the access of customers portal.
So I started with
from datetime import datetime | |
from typing import Optional | |
from pydantic import BaseModel, HttpUrl, TypeAdapter, field_validator, model_validator | |
from sqlmodel import Field, SQLModel | |
from typing_extensions import Self | |
class LinksForm(BaseModel): |
maillepaille.py:10: error: Incompatible types in assignment (expression has type "datetime", variable has type "str") [assignment] | |
maillepaille.py:15: error: Incompatible types in assignment (expression has type "date", variable has type "str") [assignment] | |
maillepaille.py:17: error: Incompatible types in assignment (expression has type "datetime", variable has type "str") [assignment] | |
maillepaille.py:19: error: Unsupported operand types for + ("str" and "timedelta") [operator] |
(yeoboseyo) ✔ ~/Projects/yeoboseyo/yeoboseyo/yeoboseyo [master|✚ 6…11] | |
11:35 $ python app.py | |
여보세요 ! | |
INFO: Started server process [25851] | |
INFO: Waiting for application startup. | |
INFO: Application startup complete. | |
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) | |
#!/usr/bin/env python | |
import asyncio | |
import json | |
import websockets | |
async def hello(): | |
uri = "ws://localhost:8888" | |
async with websockets.connect(uri) as websocket: |
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.properties import StringProperty, ListProperty | |
from kivymd.app import MDApp | |
from kivymd.theming import ThemableBehavior | |
from kivymd.uix.list import OneLineIconListItem, MDList, OneLineListItem | |
import sqlite3 |
2019-06-21 11:23:23,011 INFO tasks 14493 < TASK [Gathering Facts] > | |
2019-06-21 11:23:23,011 INFO tasks 14493 ------------------------ | |
2019-06-21 11:23:23,011 INFO tasks 14493 \ ^__^ | |
2019-06-21 11:23:23,011 INFO tasks 14493 \ (oo)\_______ | |
2019-06-21 11:23:23,011 INFO tasks 14493 (__)\ )\/\ | |
2019-06-21 11:23:23,011 INFO tasks 14493 ||----w | | |
2019-06-21 11:23:23,012 INFO tasks 14493 || || | |
2019-06-21 11:23:23,012 INFO tasks 14493 |
# coding: utf-8 | |
""" | |
joplin-web sauce starlette | |
""" | |
# starlette | |
from starlette.applications import Starlette | |
from starlette.config import Config | |
from starlette.responses import JSONResponse | |
from starlette.routing import Mount, Route, Router | |
from starlette.staticfiles import StaticFiles |
FROM python:3.6 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /app/ | |
COPY . /app | |
WORKDIR /app/ | |
RUN apt-get update && apt-get install -y sqlite3 | |
RUN pip install -r requirements.txt |
FROM python:3.6 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /app/ | |
COPY . /app | |
WORKDIR /app/ | |
RUN apt-get update && apt-get install -y sqlite3 | |
RUN pip install -r requirements.txt |