1111
1212def xfail_if_not_installed (package_name ):
1313 """A test decorator that xfails a test if the named package isn't installed.
14- The third-party tests are dependant on packages being built. During pre-release some
14+ The third-party tests are dependent on packages being built. During pre-release some
1515 packages won't be compilable. So - the pyproject.toml installs third party packages
1616 with some conditional gating.
1717
@@ -114,7 +114,7 @@ def test_cryptography():
114114
115115 cert = x509 .load_pem_x509_certificate (cert_pem , default_backend ())
116116 domain = cert .subject .get_attributes_for_oid (NameOID .COMMON_NAME )[0 ].value
117- assert "www.android.com" == domain
117+ assert domain == "www.android.com"
118118
119119
120120@xfail_if_not_installed ("pyspamsum" )
@@ -176,7 +176,7 @@ def test_numpy():
176176 from numpy import array
177177
178178 # Numpy is the thousand pound gorilla packaging test.
179- assert [ 4 , 7 ] == (array ([1 , 2 ]) + array ([3 , 5 ])).tolist ()
179+ assert (array ([1 , 2 ]) + array ([3 , 5 ])).tolist () == [ 4 , 7 ]
180180
181181
182182@xfail_if_not_installed ("pandas" )
@@ -191,10 +191,10 @@ def test_pandas():
191191
192192 # Pandas 1.5 changed the API for to_csv()
193193 if tuple (int (v ) for v in __version__ .split ("." )[:2 ]) < (1 , 5 ):
194- kwargs = dict ( line_terminator = " \n ")
194+ kwargs = { " line_terminator" : " \n "}
195195 else :
196- kwargs = dict ( lineterminator = " \n ")
196+ kwargs = { " lineterminator" : " \n "}
197197
198- assert (
199- ",Letter,Number\n " "0 ,alpha,1\n " "1 ,bravo,2\n " "2 ,charlie,3\n "
200- ) == df . to_csv ( ** kwargs )
198+ assert df . to_csv ( ** kwargs ) == (
199+ ",Letter,Number\n 0 ,alpha,1\n 1 ,bravo,2\n 2 ,charlie,3\n "
200+ )
0 commit comments