[med-svn] [Git][med-team/bitseq][master] Add autopkgtests for bitseq
harish chavre (@Harish1)
gitlab at salsa.debian.org
Thu Apr 3 10:05:38 BST 2025
harish chavre pushed to branch master at Debian Med / bitseq
Commits:
0352994c by root at 2025-04-03T09:02:16+00:00
Add autopkgtests for bitseq
- - - - -
5 changed files:
- + debian/tests/__pycache__/test_bitseq.cpython-313-pytest-8.3.5.pyc
- + debian/tests/control
- + debian/tests/pytest
- + debian/tests/simple-commands-run
- + debian/tests/test_bitseq.py
Changes:
=====================================
debian/tests/__pycache__/test_bitseq.cpython-313-pytest-8.3.5.pyc
=====================================
Binary files /dev/null and b/debian/tests/__pycache__/test_bitseq.cpython-313-pytest-8.3.5.pyc differ
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,14 @@
+Tests: pytest
+Depends: @,
+ gcc,
+ git,
+ python3-all,
+ python3-all-dev,
+ python3-pytest,
+ python3-venv,
+ bitseq
+Restrictions: allow-stderr, needs-root
+
+Tests: simple-commands-run
+Depends: @, bitseq
+Restrictions: allow-stderr, needs-root
=====================================
debian/tests/pytest
=====================================
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+echo "Running BitSeq Python script tests..."
+
+for script in checkTR.py parseAlignment.py getCounts.py extractTranscriptInfo.py; do
+ if [ -f "/usr/bin/$script" ]; then
+ echo "Testing $script..."
+ python3 "/usr/bin/$script" --help || echo "Warning: $script may not have a --help option"
+ else
+ echo "Warning: $script not found in /usr/bin"
+ fi
+done
+
+echo "All script tests completed."
=====================================
debian/tests/simple-commands-run
=====================================
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -efu
+
+# List of BitSeq commands to test
+commands="convertSamples estimateDE getGeneExpression parseAlignment getCounts"
+
+# Loop through and check if each command exists and runs
+for cmd in $commands; do
+ if ! command -v "$cmd" >/dev/null; then
+ echo "Error: Command $cmd is not installed or not in PATH"
+ exit 1
+ fi
+ echo "Running: $cmd --help"
+ $cmd --help >/dev/null || {
+ echo "Error: $cmd command failed"
+ exit 1
+ }
+done
+
+echo "Simple commands run test passed!"
=====================================
debian/tests/test_bitseq.py
=====================================
@@ -0,0 +1,25 @@
+import os
+import subprocess
+
+# Get the absolute path to the bitseq-0.7.5+dfsg directory
+BITSEQ_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
+
+def test_checkTR():
+ script_path = os.path.join(BITSEQ_DIR, "checkTR.py")
+ result = subprocess.run(["python3", script_path], capture_output=True, text=True)
+ assert result.returncode in [0, 1]
+
+def test_parseAlignment():
+ script_path = os.path.join(BITSEQ_DIR, "parseAlignment.py")
+ result = subprocess.run(["python3", script_path], capture_output=True, text=True)
+ assert result.returncode in [0, 1]
+
+def test_getCounts():
+ script_path = os.path.join(BITSEQ_DIR, "getCounts.py")
+ result = subprocess.run(["python3", script_path], capture_output=True, text=True)
+ assert result.returncode in [0, 1]
+
+def test_extractTranscriptInfo():
+ script_path = os.path.join(BITSEQ_DIR, "extractTranscriptInfo.py")
+ result = subprocess.run(["python3", script_path], capture_output=True, text=True)
+ assert result.returncode in [0, 1]
View it on GitLab: https://salsa.debian.org/med-team/bitseq/-/commit/0352994ce026f1ed5f17be657ba904896ceb7ca2
--
View it on GitLab: https://salsa.debian.org/med-team/bitseq/-/commit/0352994ce026f1ed5f17be657ba904896ceb7ca2
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250403/73b2549a/attachment-0001.htm>
More information about the debian-med-commit
mailing list