Skip to content

Commit

Permalink
461: tidy up docs and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Sharples committed Sep 24, 2024
1 parent 9d4b43f commit 021a8db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# realative file locations can be used for each test
# file.
# NOTE: autouse=True means this applies to ALL tests.
# Code that updates the cwd inside test is now redundant
# and can be deleted.
# Code that updates the cwd inside a test file is now
# redundant and can be deleted.
@pytest.fixture(autouse=True)
def change_test_dir(request, monkeypatch):
monkeypatch.chdir(request.fspath.dirname)
Expand All @@ -24,7 +24,7 @@ def ordered(obj):
return sorted(ordered(x) for x in obj)
else:
return obj


@pytest.fixture
def assert_json_equal():
Expand All @@ -35,7 +35,7 @@ def compare_json(fig, expected_json_file):
actual = json.loads(fig.to_json(), parse_float=str, parse_int=str)
with open(expected_json_file) as f:
expected = json.load(f,parse_float=str, parse_int=str)

# Fail with a nice message
if ordered(actual) == ordered(expected):
return True
Expand Down
1 change: 0 additions & 1 deletion test/scatter/test_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
def test_scatter(assert_json_equal):
scat = scatter.Scatter(util.get_params("custom_scatter.yaml"))
assert_json_equal(scat.figure, "custom_scatter_expected.json")

0 comments on commit 021a8db

Please sign in to comment.