Browse Source

whitespace

The MMGen Project 7 months ago
parent
commit
6fae61ec7c
4 changed files with 50 additions and 12 deletions
  1. 4 1
      mmgen/rpc.py
  2. 40 8
      test/cmdtest_py_d/ct_input.py
  3. 4 1
      test/test-release.sh
  4. 2 2
      test/unit_tests.py

+ 4 - 1
mmgen/rpc.py

@@ -291,7 +291,10 @@ class RPCClient(MMGenObject):
 	def _get_backend(self,backend):
 		backend_id = backend or self.cfg.rpc_backend
 		if backend_id == 'auto':
-			return {'linux':RPCBackends.httplib,'win32':RPCBackends.requests}[sys.platform](self)
+			return {
+				'linux': RPCBackends.httplib,
+				'win32': RPCBackends.requests
+			}[sys.platform](self)
 		else:
 			return getattr(RPCBackends,backend_id)(self)
 

+ 40 - 8
test/cmdtest_py_d/ct_input.py

@@ -309,28 +309,60 @@ class CmdTestInput(CmdTestBase):
 		return self._get_char(['prompt> ','xyz',False,5],'x','x',True)
 
 	def line_input(self):
-		return self._line_input(['prompt> ',True,'',True],'foo','foo',False)
+		return self._line_input(
+			['prompt> ', True, '', True],
+			'foo',
+			'foo',
+			False)
 
 	def line_input_term1(self):
-		return self._line_input(['prompt> ',True,'',True],'foo','foo',True)
+		return self._line_input(
+			['prompt> ', True, '', True],
+			'foo',
+			'foo',
+			True)
 
 	def line_input_term2(self):
-		return self._line_input(['prompt> ',True,'',False],'foo','foo',True)
+		return self._line_input(
+			['prompt> ', True, '', False],
+			'foo',
+			'foo',
+			True)
 
 	def line_input_insert(self):
-		return self._line_input(['prompt> ',True,'inserted text',True],'foo','foo',False)
+		return self._line_input(
+			['prompt> ', True, 'inserted text', True],
+			'foo',
+			'foo',
+			False)
 
 	def line_input_insert_term1(self):
-		return self._line_input(['prompt> ',True,'foo',True],'bar','foobar',True)
+		return self._line_input(
+			['prompt> ', True, 'foo', True],
+			'bar',
+			'foobar',
+			True)
 
 	def line_input_insert_term2(self):
-		return self._line_input(['prompt> ',True,'foo',False],'bar','foobar',True)
+		return self._line_input(
+			['prompt> ', True, 'foo', False],
+			'bar',
+			'foobar',
+			True)
 
 	def line_input_edit_term(self):
-		return self._line_input(['prompt> ',True,'φυφυ',True],'\b\bβαρ','φυβαρ',True)
+		return self._line_input(
+			['prompt> ', True, 'φυφυ', True],
+			'\b\bβαρ',
+			'φυβαρ',
+			True)
 
 	def line_input_erase_term(self):
-		return self._line_input(['prompt> ',True,'foobarbaz',True],Ctrl_U+'foobar','foobar',True)
+		return self._line_input(
+			['prompt> ', True, 'foobarbaz', True],
+			Ctrl_U + 'foobar',
+			'foobar',
+			True)
 
 	def _password_entry(self,prompt,opts=[],term=False):
 		if term and sys.platform == 'win32':

+ 4 - 1
test/test-release.sh

@@ -243,7 +243,10 @@ if [ "$MSYS2" ]; then
 	DISTRO='MSYS2'
 else
 	DISTRO=$(grep '^ID=' '/etc/os-release' | cut -c 4-)
-	[ "$DISTRO" ] || { echo 'Unable to determine distro.  Aborting'; exit 1; }
+	[ "$DISTRO" ] || {
+		echo 'Unable to determine distro from /etc/os-release. Aborting'
+		exit 1
+	}
 fi
 
 cmdtest_py='test/cmdtest.py -n'

+ 2 - 2
test/unit_tests.py

@@ -186,8 +186,8 @@ def run_test(test,subtest=None):
 	if hasattr(mod,'unit_tests'): # new class-based API
 		t = getattr(mod,'unit_tests')()
 		altcoin_deps = getattr(t,'altcoin_deps',())
-		win_skip = getattr(t,'win_skip',())
-		arm_skip = getattr(t,'arm_skip',())
+		win_skip = getattr(t, 'win_skip', ())
+		arm_skip = getattr(t, 'arm_skip', ())
 		subtests = (
 			[subtest] if subtest else
 			[k for k,v in type(t).__dict__.items() if type(v).__name__ == 'function' and k[0] != '_']