Skip to content

Commit

Permalink
Small black fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfullard committed Jul 22, 2022
1 parent 179b8bb commit f9a1fce
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions tardis/visualization/widgets/tests/test_custom_abundance.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def yml_data():
-------
CustomAbundanceWidgetData
CustomAbundanceWidgetData generated from a YAML
"""
"""
yml_path = os.path.join(
tardis.__path__[0],
"io",
Expand All @@ -41,7 +41,7 @@ def csvy_data():
-------
CustomAbundanceWidgetData
CustomAbundanceWidgetData generated from a CSVY
"""
"""
csvy_path = os.path.join(
tardis.__path__[0], "io", "tests", "data", "csvy_full.csvy"
)
Expand Down Expand Up @@ -73,7 +73,7 @@ def sim_data(simulation_verysimple):
-------
CustomAbundanceWidgetData
CustomAbundanceWidgetData generated from a simulation
"""
"""
return CustomAbundanceWidgetData.from_simulation(simulation_verysimple)


Expand All @@ -86,16 +86,15 @@ def caw(yml_data):
-------
CustomAbundanceWidget
CustomAbundanceWidget generated from a YAML
"""
"""
caw = CustomAbundanceWidget(yml_data)
caw.display()
return caw


class TestCustomAbundanceWidgetData:
class TestCustomAbundanceWidgetData:
def test_get_symbols(self, yml_data):
"""Tests the atomic symbols for the YAML CustomAbundanceWidgetData
"""
"""Tests the atomic symbols for the YAML CustomAbundanceWidgetData"""
symbols = yml_data.get_symbols()
npt.assert_array_equal(symbols, ["O", "Mg", "Si", "S", "Ar", "Ca"])

Expand All @@ -107,7 +106,7 @@ def test_update_input_item_value(self, caw):
Parameters
----------
caw : CustomAbundanceWidget
"""
"""
caw.update_input_item_value(0, 0.33333)
assert caw.input_items[0].value == 0.333

Expand All @@ -117,7 +116,7 @@ def test_read_abundance(self, caw):
Parameters
----------
caw : CustomAbundanceWidget
"""
"""
caw.data.abundance[0] = 0.2
caw.read_abundance()
for i in range(caw.no_of_elements):
Expand All @@ -129,7 +128,7 @@ def test_update_abundance_plot(self, caw):
Parameters
----------
caw : CustomAbundanceWidget
"""
"""
caw.data.abundance.iloc[0, :] = 0.2
caw.update_abundance_plot(0)

Expand Down Expand Up @@ -188,7 +187,7 @@ def test_update_bar_diagonal(
expected_x : list
expected_y : list
expected_width : list
"""
"""
if multishell_edit:
caw.irs_shell_range.disabled = False # update_bar_diagonal() will be called when status of irs_shell_range is changed
caw.irs_shell_range.value = (1, 20)
Expand Down Expand Up @@ -244,7 +243,7 @@ def test_on_btn_norm(self, caw, multishell_edit, inputs, locks, expected):
inputs : list
locks : list
expected : list
"""
"""
if multishell_edit:
caw.rbs_multi_apply.index = 0
for i, item in enumerate(caw.input_items):
Expand Down Expand Up @@ -278,8 +277,7 @@ def test_on_btn_norm(self, caw, multishell_edit, inputs, locks, expected):

class TestCustomYAML:
def test_create_fields_dict(self):
"""Test creating fields in the YAML
"""
"""Test creating fields in the YAML"""
custom_yaml = CustomYAML("test", 0, 0, 0, 0)
custom_yaml.create_fields_dict(["H", "He"])
datatype_dict = {
Expand Down

0 comments on commit f9a1fce

Please sign in to comment.