diff --git a/.github/workflows/python-package.macos.yml b/.github/workflows/python-package.macos.yml index 6ced5a65..be0435ff 100644 --- a/.github/workflows/python-package.macos.yml +++ b/.github/workflows/python-package.macos.yml @@ -92,7 +92,7 @@ jobs: if: ${{ matrix.python-version != '3.7' }} run: | echo -e '[run]\nomit = *dihedrals.py,*contact_matrix.py' > .coveragerc - pytest -n 8 -vs --cov=./ --cov-report=xml --disable-warnings --cov-config=.coveragerc + pytest -k Test_ExamplesCLTs -n 8 -vs --cov=./ --cov-report=xml --disable-warnings --cov-config=.coveragerc - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/mdciao/examples/examples.py b/mdciao/examples/examples.py index daa97eb6..7dd1f03b 100644 --- a/mdciao/examples/examples.py +++ b/mdciao/examples/examples.py @@ -225,7 +225,7 @@ def run(self, clt,show=True): oneline = self._join_args(clt) CP = [] for line in oneline.split("\n\n"): - CP.append(_run(line.split())) + CP.append(_run(line.split(), capture_output=True)) if self.test: return CP diff --git a/tests/test_scripts.py b/tests/test_scripts.py index cc52b92b..a7678be7 100644 --- a/tests/test_scripts.py +++ b/tests/test_scripts.py @@ -44,6 +44,8 @@ def test_mdc_sites(self): CP = self.xCLTs.run("mdc_sites", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_neighborhood(self): @@ -52,6 +54,8 @@ def test_mdc_neighborhood(self): CP = self.xCLTs.run("mdc_neighborhoods", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_interface(self): @@ -60,6 +64,8 @@ def test_mdc_interface(self): CP = self.xCLTs.run("mdc_interface", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_fragments(self): @@ -68,6 +74,8 @@ def test_mdc_fragments(self): CP = self.xCLTs.run("mdc_fragments", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_BW(self): @@ -76,6 +84,8 @@ def test_mdc_BW(self): CP = self.xCLTs.run("mdc_GPCR_overview", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0, CP def test_mdc_CGN(self): @@ -84,6 +94,8 @@ def test_mdc_CGN(self): CP = self.xCLTs.run("mdc_CGN_overview", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_pdb(self): @@ -92,24 +104,32 @@ def test_mdc_pdb(self): CP = self.xCLTs.run("mdc_pdb", # show=True ) + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_compare(self): with remember_cwd(): os.chdir(self.tmpdir) CP = self.xCLTs.run("mdc_compare") + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_residues(self): with remember_cwd(): os.chdir(self.tmpdir) CP = self.xCLTs.run("mdc_residues") + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0 def test_mdc_notebooks(self): with remember_cwd(): os.chdir(self.tmpdir) CP = self.xCLTs.run("mdc_notebooks") + print([iCP.stdout.decode().splitlines() for iCP in CP]) + print([iCP.stderr.decode().splitlines() for iCP in CP]) assert _np.unique([iCP.returncode for iCP in CP]) == 0