Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 1, 2024
1 parent b12cbbe commit 3b24aea
Show file tree
Hide file tree
Showing 33 changed files with 18 additions and 38 deletions.
1 change: 0 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@
no_internet_connection,
assert_domain_equal,
)

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import tests



class TestThevenin(unittest.TestCase):
def test_basic_processing(self):
model = pybamm.equivalent_circuit.Thevenin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ def test_with_experiment(self):
sim.solve(calc_esoh=False)


class TestBasicSPM(BaseBasicModelTest,unittest.TestCase):
class TestBasicSPM(BaseBasicModelTest, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.BasicSPM()


class TestBasicDFN(BaseBasicModelTest,unittest.TestCase):
class TestBasicDFN(BaseBasicModelTest, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.BasicDFN()


class TestBasicDFNComposite(BaseBasicModelTest,unittest.TestCase):
class TestBasicDFNComposite(BaseBasicModelTest, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.BasicDFNComposite()


class TestBasicDFNHalfCell(BaseBasicModelTest,unittest.TestCase):
class TestBasicDFNHalfCell(BaseBasicModelTest, unittest.TestCase):
def setUp(self):
options = {"working electrode": "positive"}
self.model = pybamm.lithium_ion.BasicDFNHalfCell(options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import unittest



class TestCompareOutputsTwoPhase(unittest.TestCase):
def compare_outputs_two_phase_graphite_graphite(self, model_class):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tests import BaseIntegrationTestLithiumIon


class TestDFN(BaseIntegrationTestLithiumIon,unittest.TestCase):
class TestDFN(BaseIntegrationTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.DFN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseIntegrationTestLithiumIonHalfCell


class TestDFNHalfCell(BaseIntegrationTestLithiumIonHalfCell,unittest.TestCase):
class TestDFNHalfCell(BaseIntegrationTestLithiumIonHalfCell, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.DFN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseIntegrationTestLithiumIon


class TestNewmanTobias(BaseIntegrationTestLithiumIon,unittest.TestCase):
class TestNewmanTobias(BaseIntegrationTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.NewmanTobias

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseIntegrationTestLithiumIon


class TestSPM(BaseIntegrationTestLithiumIon,unittest.TestCase):
class TestSPM(BaseIntegrationTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPM

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseIntegrationTestLithiumIonHalfCell


class TestSPMHalfCell(BaseIntegrationTestLithiumIonHalfCell,unittest.TestCase):
class TestSPMHalfCell(BaseIntegrationTestLithiumIonHalfCell, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPM

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseIntegrationTestLithiumIon


class TestSPMe(BaseIntegrationTestLithiumIon,unittest.TestCase):
class TestSPMe(BaseIntegrationTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPMe

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseIntegrationTestLithiumIonHalfCell


class TestSPMeHalfCell(BaseIntegrationTestLithiumIonHalfCell,unittest.TestCase):
class TestSPMeHalfCell(BaseIntegrationTestLithiumIonHalfCell, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPMe

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import unittest



class TestThermal(unittest.TestCase):
def test_consistent_cooling(self):
"Test the cooling is consistent between the 1D, 1+1D and 2+1D SPMe models"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import tests



class TestYang2017(unittest.TestCase):
def test_basic_processing(self):
model = pybamm.lithium_ion.Yang2017()
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_batch_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Tests for the batch_study.py
"""


import os
import pybamm
import unittest
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_expression_tree/test_averages.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tests import assert_domain_equal



class TestUnaryOperators(unittest.TestCase):
def test_x_average(self):
a = pybamm.Scalar(4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Tests for the latexify.py
"""


import os
import platform
import unittest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Tests for the print_name.py
"""


import unittest

import pybamm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Tests for the sympy_overrides.py
"""


import unittest

import pybamm
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/test_expression_tree/test_unary_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,7 @@ def test_boundary_value(self):
auxiliary_domains={"secondary": "current collector"},
)
boundary_a_sec = pybamm.boundary_value(a_sec, "right")
assert_domain_equal(
boundary_a_sec.domains, {"primary": ["current collector"]}
)
assert_domain_equal(boundary_a_sec.domains, {"primary": ["current collector"]})
# test with secondary domain and tertiary domain
a_tert = pybamm.Symbol(
"a",
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_meshes/test_one_dimensional_submesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np



class TestSubMesh1D(unittest.TestCase):
def test_tabs(self):
edges = np.linspace(0, 1, 10)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_meshes/test_zero_dimensional_submesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import unittest



class TestSubMesh0D(unittest.TestCase):
def test_exceptions(self):
position = {"x": {"position": 0}, "y": {"position": 0}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseUnitTestLithiumIon


class TestDFN(BaseUnitTestLithiumIon,unittest.TestCase):
class TestDFN(BaseUnitTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.DFN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseUnitTestLithiumIonHalfCell


class TestDFNHalfCell(BaseUnitTestLithiumIonHalfCell,unittest.TestCase):
class TestDFNHalfCell(BaseUnitTestLithiumIonHalfCell, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.DFN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseUnitTestLithiumIon


class TestNewmanTobias(BaseUnitTestLithiumIon,unittest.TestCase):
class TestNewmanTobias(BaseUnitTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.NewmanTobias

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseUnitTestLithiumIon


class TestSPM(BaseUnitTestLithiumIon,unittest.TestCase):
class TestSPM(BaseUnitTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPM

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseUnitTestLithiumIonHalfCell


class TestSPMHalfCell(BaseUnitTestLithiumIonHalfCell,unittest.TestCase):
class TestSPMHalfCell(BaseUnitTestLithiumIonHalfCell, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPM

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests import BaseUnitTestLithiumIon


class TestSPMe(BaseUnitTestLithiumIon,unittest.TestCase):
class TestSPMe(BaseUnitTestLithiumIon, unittest.TestCase):
def setUp(self):
self.model = pybamm.lithium_ion.SPMe

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_parameters/test_base_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Tests for the base_parameters.py
"""


import pybamm
import unittest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import numpy as np



class TestSizeDistributionParameters(unittest.TestCase):
def test_parameter_values(self):
values = pybamm.lithium_ion.BaseModel().default_parameter_values
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_plotting/test_plot_summary_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np



class TestPlotSummaryVariables(unittest.TestCase):
def test_plot(self):
model = pybamm.lithium_ion.SPM({"SEI": "ec reaction limited"})
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_solvers/test_casadi_algebraic_solver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import casadi
import pybamm
import unittest
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_solvers/test_casadi_solver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import pybamm
import unittest
import numpy as np
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import unittest



class TestTimer(unittest.TestCase):
"""
Tests the basic methods of the Timer class.
Expand Down

0 comments on commit 3b24aea

Please sign in to comment.