\ looks like this

from starlette.applications import Starlette
from starlette.responses import UJSONResponse
from starlette.routing import Route

async def homepage(request):
    return UJSONResponse({'hello': 'world'})

app = Starlette(debug=True, routes=[
    Route('/', homepage)
]) looks like this

from starlette.testclient import TestClient

from import app

def test_app():
    client = TestClient(app)
    response = client.get('/')
    assert response.status_code == 200 is an empty file.

When I try to run pytest -v from my project directory it fails with the error

tests/ in <module>
    from starlette.testclient import TestClient
E   ModuleNotFoundError: No module named 'starlette'

I am able to run the application. Also I was trying to put into both - tests and project folders and it did not help.