@@ -57,9 +57,7 @@ def test_call(self):
57
57
self .assertIs (ProblemSense ('minimize' ), ObjectiveSense .minimize )
58
58
self .assertIs (ProblemSense ('maximize' ), ObjectiveSense .maximize )
59
59
60
- with self .assertRaisesRegex (
61
- ValueError , "'foo' is not a valid ProblemSense"
62
- ):
60
+ with self .assertRaisesRegex (ValueError , "'foo' is not a valid ProblemSense" ):
63
61
ProblemSense ('foo' )
64
62
65
63
def test_contains (self ):
@@ -71,11 +69,11 @@ def test_contains(self):
71
69
self .assertIn (ProblemSense .minimize , ObjectiveSense )
72
70
self .assertIn (ProblemSense .maximize , ObjectiveSense )
73
71
72
+
74
73
class TestObjectiveSense (unittest .TestCase ):
75
74
def test_members (self ):
76
75
self .assertEqual (
77
- list (ObjectiveSense ),
78
- [ObjectiveSense .minimize , ObjectiveSense .maximize ],
76
+ list (ObjectiveSense ), [ObjectiveSense .minimize , ObjectiveSense .maximize ]
79
77
)
80
78
81
79
def test_hasattr (self ):
@@ -89,9 +87,7 @@ def test_call(self):
89
87
self .assertIs (ObjectiveSense ('minimize' ), ObjectiveSense .minimize )
90
88
self .assertIs (ObjectiveSense ('maximize' ), ObjectiveSense .maximize )
91
89
92
- with self .assertRaisesRegex (
93
- ValueError , "'foo' is not a valid ObjectiveSense"
94
- ):
90
+ with self .assertRaisesRegex (ValueError , "'foo' is not a valid ObjectiveSense" ):
95
91
ObjectiveSense ('foo' )
96
92
97
93
def test_str (self ):
0 commit comments