Skip to content

Commit

Permalink
add code in finally blocks to reset config to default values, when te…
Browse files Browse the repository at this point in the history
…sts change them
  • Loading branch information
andrewelamb committed Nov 8, 2024
1 parent 35d440b commit 6c3d0ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/integration/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pandas as pd
import numpy as np

from schematic.configuration.configuration import Configuration
from schematic.configuration.configuration import Configuration, CONFIG
from schematic.manifest.commands import manifest
from schematic.models.commands import model
from tests.conftest import ConfigurationForTesting
Expand Down Expand Up @@ -639,6 +639,9 @@ def test_generate_bulk_rna_google_sheet_manifest(
os.remove("tests/data/example.BulkRNA-seqAssay.schema.json")
os.remove("tests/data/example.BulkRNA-seqAssay.manifest.csv")

# Reset config to it's default values
CONFIG.load_config("config_example.yml")

assert result.exit_code == 0
assert result.output.split("\n")[7] == (
"Find the manifest template using this Google Sheet URL:"
Expand Down Expand Up @@ -1142,6 +1145,9 @@ def test_generate_mock_component_excel_manifest(self, runner: CliRunner) -> None
os.remove("tests/data/example.MockComponent.schema.json")
os.remove("test-example.xlsx")

# Reset config to it's default values
CONFIG.load_config("config_example.yml")

# Command has no errors, has exit code 0
assert result.exit_code == 0
# Command output has excel file message
Expand Down

0 comments on commit 6c3d0ce

Please sign in to comment.