From 3396679e446c9992e00d238fda89fb828f380bbb Mon Sep 17 00:00:00 2001 From: "dmy.berezovskyi" Date: Tue, 8 Oct 2024 14:03:01 +0300 Subject: [PATCH] fix ruff --- Dockerfile | 31 ++++++++++++++++++++++++++ src/pageobjects/__init__.py | 0 src/pageobjects/text/__init__.py | 0 tests/test_fill_form/test_fill_form.py | 2 +- 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 src/pageobjects/__init__.py create mode 100644 src/pageobjects/text/__init__.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..327ebf5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# Use an official Python image compatible with arm64 architecture +FROM --platform=linux/arm64 python:3.12-slim + +# Set environment variables +ENV POETRY_VERSION=1.8.1 +ENV PATH="/root/.local/bin:$PATH" +ENV PYTHONPATH="pytest-python-selenium-framework" + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + build-essential \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Install Poetry +RUN curl -sSL https://install.python-poetry.org | python3 - + +# Set the working directory +WORKDIR pytest-python-selenium-framework + +# Copy the poetry files to the container +COPY pyproject.toml poetry.lock* ./ + +# Install the dependencies using Poetry +RUN poetry install --no-root --only main # Use --only main to skip dev dependencies + +# Copy the rest of the application code +COPY . . + +# Specify the command to run the tests +CMD ["poetry", "run", "pytest"] diff --git a/src/pageobjects/__init__.py b/src/pageobjects/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/pageobjects/text/__init__.py b/src/pageobjects/text/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_fill_form/test_fill_form.py b/tests/test_fill_form/test_fill_form.py index e1525ab..0df66c2 100644 --- a/tests/test_fill_form/test_fill_form.py +++ b/tests/test_fill_form/test_fill_form.py @@ -1,4 +1,4 @@ -from pageobjects.text.fill_form import FillForm +from src.pageobjects.text.fill_form import FillForm class TestFillForm: