Skip to content

Refactor base_tr fixture to remove SlurmSystem dependency #780

@coderabbitai

Description

@coderabbitai

Background

In PR #779, during review of the Kubernetes test sanitization, it was identified that the base_tr fixture unnecessarily depends on SlurmSystem, which causes Kubernetes-only tests to instantiate both a KubernetesSystem and a SlurmSystem.

Proposed Change

Update the base_tr fixture definition in tests/conftest.py:

Current:

def base_tr(slurm_system: SlurmSystem) -> TestRun:

Proposed:

def base_tr(tmp_path: Path) -> TestRun:

This change will make the fixture system-agnostic and avoid unnecessary system instantiation in tests that don't require SLURM.

Tasks

  • Update base_tr fixture signature to use tmp_path: Path instead of slurm_system: SlurmSystem
  • Fix all usages of base_tr throughout the test suite to work with the new signature
  • Verify all tests still pass after the refactoring

References

Requested by: @amaslenn

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions