Giter Site home page Giter Site logo

Comments (2)

lxp avatar lxp commented on May 25, 2024

From what I can tell it is used by the old test harness. It can run all tests inside one Python process or spawn a new Python processes for each test.
Whenever cfv needs to be called it uses this wrapper script: https://github.com/cfv-project/cfv/blob/779d30f3aa0c6f4cb77b694823db64a0a89200af/test/cfv
It modifies the sys.path variable, so that it executes the cfv version from the directory instead of running a system-wide installation:

cfv/test/cfv

Line 6 in 779d30f

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, 'lib')))

According to the comment above the line you mentioned, imp.load_source is only used to ensue that sys.path is modified:
# This is so that the sys.path modification of the wrapper (if it has one) will be executed..

I am not really sure myself if this is still needed or was only required in older Python versions. At least the comment was added in 2006: 4cf1b20

from cfv.

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.