Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7613283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:07:05+00:00 2026-05-31T02:07:05+00:00

I am running my Test Harness which is written in Python. Before running a

  • 0

I am running my Test Harness which is written in Python. Before running a test through this test harness, I am exporting some environment variables through a shell script which calls the test harness after exporting the variables. When the harness comes in picture, it checks if the variables are in the environment and does operations depending on the values in the env variables.

However after the test is executed, I think the environment variables values aren’t getting cleared as the next time, it picks up those values even if those aren’t set through the shell script.

If they are set explicitly, the harness picks up the new values but if we clear it next time, it again picks up the values set in 1st run.

I tried clearing the variables using “del os.environ[‘var’]” command after every test execution but that didn’t solve the issue. Does anybody know why are these values getting preserved?

On the shell these variables are not set as seen in the ‘env’ unix command. It is just in the test harness that it shows the values. None of the env variables store their values in any text files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:07:07+00:00Added an answer on May 31, 2026 at 2:07 am

    A subshell can change variables it inherited from the parent, but the changes made by the child don’t affect the parent.
    When a new subshell is started, in which the variable exported from the parent is visible. The variable is unsetted by del os.environ['var'], but the value for this variable in the parent stays the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my shell script I am running a command which is asking me for
I have written a custom test harness in Python (existing stuff was not a
I'm running a test, and found that the file doesn't actually get written until
I've gotten a simple WatiN web test running on my dev environment and am
I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command
I have an integration test harness which launches a console exe several times, simultaneously,
I have a Test::More test script for a module we have made. When running
In my C# program, I have a thread that represents a running test, which
Our current test system harness was originally written in 16 bit Clipper 13 years
hiii i am getting this error while running test for my fluent nhibernate application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.