diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-07 23:50:49 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 23:50:49 +0530 |
commit | 1f6c6aa94b323cbb378de45d6f4788b1b81b667a (patch) | |
tree | 49d74d307346d8f4a4aca0aaaf669015715e77e8 /plip/test/test_command_line.py | |
parent | d52918b32d9c9149752c5e8418f4fc0692d05089 (diff) | |
parent | 702e1bb1a48ba0f7a180bc097488ed7fb4038697 (diff) |
Merge pull request #2 from navanchauhan/deepsource-transform-9a5f8268
Format code with Black
Diffstat (limited to 'plip/test/test_command_line.py')
-rw-r--r-- | plip/test/test_command_line.py | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/plip/test/test_command_line.py b/plip/test/test_command_line.py index d3ab332..b561997 100644 --- a/plip/test/test_command_line.py +++ b/plip/test/test_command_line.py @@ -20,35 +20,46 @@ class CommandLineTest(unittest.TestCase): def test_empty_input_file(self): """Input file is empty.""" - exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -f ./special/empty.pdb -o {self.tmp_dir.name}', - shell=True) + exitcode = subprocess.call( + f"{sys.executable} ../plipcmd.py -f ./special/empty.pdb -o {self.tmp_dir.name}", + shell=True, + ) self.assertEqual(exitcode, 1) def test_invalid_pdb_id(self): """A PDB ID with no valid PDB record is provided.""" - exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -i xx1x -o {self.tmp_dir.name}', shell=True) + exitcode = subprocess.call( + f"{sys.executable} ../plipcmd.py -i xx1x -o {self.tmp_dir.name}", shell=True + ) self.assertEqual(exitcode, 1) def test_invalid_input_file(self): """A file is provided which is not a PDB file.""" - exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -f ./special/non-pdb.pdb -o {self.tmp_dir.name}', - shell=True) + exitcode = subprocess.call( + f"{sys.executable} ../plipcmd.py -f ./special/non-pdb.pdb -o {self.tmp_dir.name}", + shell=True, + ) self.assertEqual(exitcode, 1) def test_pdb_format_not_available(self): """A valid PDB ID is provided, but there is no entry in PDB format from wwPDB""" - exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -i 4v59 -o {self.tmp_dir.name}', shell=True) + exitcode = subprocess.call( + f"{sys.executable} ../plipcmd.py -i 4v59 -o {self.tmp_dir.name}", shell=True + ) self.assertEqual(exitcode, 1) def test_valid_pdb(self): """A PDB ID with no valid PDB record is provided.""" - exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -x -f ./pdb/1eve.pdb -o {self.tmp_dir.name}', - shell=True) + exitcode = subprocess.call( + f"{sys.executable} ../plipcmd.py -x -f ./pdb/1eve.pdb -o {self.tmp_dir.name}", + shell=True, + ) self.assertEqual(len(os.listdir(self.tmp_dir.name)), 2) self.assertEqual(exitcode, 0) def test_stdout(self): """A PDB ID with no valid PDB record is provided.""" - exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -t -f ./pdb/1eve.pdb -O', shell=True) + exitcode = subprocess.call( + f"{sys.executable} ../plipcmd.py -t -f ./pdb/1eve.pdb -O", shell=True + ) self.assertEqual(exitcode, 0) - |