Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run pytest from anywhere in the bench directory #3

Open
0xsirsaif opened this issue Oct 11, 2023 · 0 comments
Open

Run pytest from anywhere in the bench directory #3

0xsirsaif opened this issue Oct 11, 2023 · 0 comments

Comments

@0xsirsaif
Copy link
Owner

The issue arises when connecting to the site, as the Database class attempts to access the database logger module (e.g., database.log). Within the logger module, the problem is attributed to the incorrect configuration of log_filename, which is currently dependent on a specific directory. This setup only functions properly when running pytest from the sites/ directory.

You can find the problematic code at the following location:
https://github.com/frappe/frappe/blob/bad161ad89412c162def3a9938a51c6bf2ce0484/frappe/utils/logger.py#L61

In essence, the issue stems from the log_filename configuration in the logger.py module, which lacks flexibility and is not adaptable to different directory structures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant