GithubHelp home page GithubHelp logo

Comments (5)

fizyk avatar fizyk commented on June 7, 2024

What do you mean after first start? process fixture (postgresql_proc) has a session scope, so it'll start when the first test using postgresql will need it, and be running until the last one. postgresql fixture on the other hand, takes care of creating a connection to your tests, and cleaning the database after each test.

from pytest-postgresql.

fizyk avatar fizyk commented on June 7, 2024

From @enkore on May 5, 2016 8:13

What do you mean after first start?

After tests have run, before /tmp is emptied by the system (reboot or cronjob, or manually). My observation is that the logfile is not deleted (contrary to the docstring of remove_postgresql_directory, but in line with how I read the code) when the fixture finalizer is run.

$ rm /tmp/postgresql.5433.log
$ py.test
...
== xyz passed ... ==
$ py.test
...
$ grep "database system is ready to accept connections" /tmp/postgresql.5433.log 
LOG:  database system is ready to accept connections
LOG:  database system is ready to accept connections

from pytest-postgresql.

fizyk avatar fizyk commented on June 7, 2024

oh.... because it landed outside the postgresql datadir... could you create another issue for that?

from pytest-postgresql.

fizyk avatar fizyk commented on June 7, 2024

However it should only be deleted at the beginning. or maybe rotated? Something to ease up debugging in case there's something wrong in tests.

from pytest-postgresql.

fizyk avatar fizyk commented on June 7, 2024

From @enkore on May 5, 2016 22:16

Truncate it when starting a new instance: It would live on after tests (only a little bit of file system garbage, and /tmp'd by default), so debugging is easy

could you create another issue for that?

sure

from pytest-postgresql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.