Skip to content

Commit

Permalink
fix and test env var passing between fixtures and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luto committed Jul 16, 2024
1 parent 5dea76a commit f490b1d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/shellinspector/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def run(self, specfile: Specfile, outer_used_sessions=None):
self.run(specfile.fixture_specfile_post, used_sessions)

finally:
if not outer_used_sessions:
if outer_used_sessions is None:
for session in used_sessions:
session.pop_state()

Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/900_fixtures.ispec
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ settings:
fixture_dirs:
- fixtures
---
%~ id create_user
% echo $USRNAME
create_user
%~ id $USRNAME
create_user
3 changes: 2 additions & 1 deletion tests/e2e/fixtures/create_user_pre.ispec
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
% adduser -D create_user
% export USRNAME=create_user
% adduser -D $USRNAME

0 comments on commit f490b1d

Please sign in to comment.