Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Pytest and rootdirectory
Post: RE: Pytest and rootdirectory

Nice, but I decided to solve it in the following way: import os import pytest WORKING_DIR = None @pytest.fixture def working_dir(autouse=True, scope='function'): global WORKING_DIR if not ...
Master_Sergius General Coding Help 4 4,685 Jun-01-2020, 05:05 PM
    Thread: Pytest and rootdirectory
Post: RE: Pytest and rootdirectory

Yeah, I was thinking about it. But how to determine and store my base directory if I can't hardcode absolute path? i.e. it will be running on any machine
Master_Sergius General Coding Help 4 4,685 Jun-01-2020, 08:45 AM
    Thread: Pytest and rootdirectory
Post: Pytest and rootdirectory

Hello. I have a lot of tests and run with pytest. Some code (in product, not in tests) perform operations like os.chdir(some_dir), thus tests which are looking for some testdata always fail after tha...
Master_Sergius General Coding Help 4 4,685 May-31-2020, 06:02 PM
    Thread: SQLAlchemy, log only one record from failed insert
Post: SQLAlchemy, log only one record from failed insert

Hello, sometimes I can find in logs following long tracebacks: ... (part of Traceback is skipped) ... "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py\", line 948, in execute\n re...
Master_Sergius Web Scraping & Web Development 0 2,155 Dec-21-2018, 02:04 PM
    Thread: SQLAlchemy, TypeDecorator and alias
Post: SQLAlchemy, TypeDecorator and alias

Hi all, I'm fighting with a very complex software. In one place there is a TypeDecorator for datetime.datetime, which is always returns datetime (i.e. transform selected datetime) with tzinfo UTC. It...
Master_Sergius Web Scraping & Web Development 0 2,087 Dec-17-2018, 09:58 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020