Skip to content

Patch check_pip #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
- name: Test Dependencies with py${{ matrix.python-version }} on ${{ matrix.os }}
run: |
hash -p ./.github/tool_shlock_helper.sh shlock ; export TMPDIR=./ ;
./tests/check_pip 2>&1 >> $GITHUB_STEP_SUMMARY || echo "::warning file=tests/check_pip,line=1,endLine=1,title=SKIPPED::SKIP Requirements Tests." ;
./tests/check_pip ;
shell: bash
if: ${{ !cancelled() }}
- name: Upload Python ${{ matrix.python-version }} Legacy Setup.py coverage to Codecov
Expand Down Expand Up @@ -618,10 +618,10 @@
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Prep Testing Tox
id: prep-tox
run: |

Check warning on line 624 in .github/workflows/Tests.yml

View workflow job for this annotation

GitHub Actions / TOX

SKIPPED

SKIP Enhanced TOX Tests.

Check warning on line 624 in .github/workflows/Tests.yml

View workflow job for this annotation

GitHub Actions / TOX

SKIPPED

SKIP Enhanced TOX Tests.

Check warning on line 624 in .github/workflows/Tests.yml

View workflow job for this annotation

GitHub Actions / TOX

SKIPPED

SKIP Enhanced TOX Tests.
if [ "$OS" == "ubuntu-latest" ] ; then { apt-get update || true ;} ; wait ; { apt-get install --assume-yes python3.10 python3.11 || echo "::warning file=.github/workflows/Tests.yml,line=621,endLine=624,title=SKIPPED::SKIP Enhanced TOX Tests." ;} ; wait ; fi
- name: Install dependencies for Tox
run: |
Expand Down
2 changes: 1 addition & 1 deletion multicast/recv.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,5 +607,5 @@ def doStep(self, *args, **kwargs):
print(str(response))
print(multicast._BLANK) # skipcq: PYL-W0212 - module ok
_result = (len(response) > 0) is True
return tuple((_result, None if not _result else response)) # skipcq: PTC-W0020 - intended
return (_result, None if not _result else response) # skipcq: PTC-W0020 - intended

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ setuptools>=75.0
# pip - MIT license
pip>=22.0
# build - MIT license
build>=1.1.1
build>=1.1.1, !=1.2.2.post1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai,
CI found found a test bug:

E AssertionError: Regex didn't match: '^\s*[a-zA-Z0-9_-.]+(?:,?\s?(?:==|!=|>=|<=|>|<)\s?[0-9.]+)+(?:\s*(?:#.*)?)$' not found in 'build>=1.2.1, !=1.2.2.post1' : Invalid requirement format at line 69: 'build>=1.2.1, !=1.2.2.post1'

this is coming from the test code in tests/test_deps.py around line 69.

The regular expression misses PEP-440 style a#, b#, rc#, .pre# and .post# suffixes.

Help me fix the regular expression.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reactive-firewall,

The current regular expression doesn't account for PEP-440 version suffixes like a#, b#, rc#, .pre#, and .post#. To fix this, we need to update the regex to accommodate these suffixes.

Here's an updated regex that should cover these cases:

r'^\s*[a-zA-Z0-9_\-\.]+(?:,?\s*(?:==|!=|>=|<=|>|<)\s*[0-9]+(?:\.[0-9]+)*(?:[a-zA-Z]+[0-9]*)?(?:\.[a-zA-Z]+[0-9]*)*)+(?:\s*(?:#.*)?)$'

This regex allows for:

  • Package names containing letters, numbers, underscores, hyphens, and dots.
  • One or more version specifiers, each potentially starting with a comma.
  • Version numbers that can include numbers and dots, followed by optional alphabetic suffixes (e.g., rc1, post1), and additional dot-separated segments.
  • Comments at the end of the line.

Please update the regular expression in tests/test_deps.py around line 69 with this updated version to fix the test failure.

I recall from previous learnings that requirements lines may include multiple version specifiers separated by commas, and that the regex should accommodate this format.

Let me know if you need any further assistance.


✏️ Learnings added
Learnt from: reactive-firewall
PR: reactive-firewall/multicast#162
File: requirements.txt:34-34
Timestamp: 2024-10-15T08:52:00.534Z
Learning: When validating requirements files in `tests/test_deps.py`, ensure that the regex accounts for PEP-440 version suffixes such as `a#`, `b#`, `rc#`, `.pre#`, and `.post#`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: reactive-firewall
PR: reactive-firewall/multicast#0
File: :0-0
Timestamp: 2024-10-12T00:41:41.731Z
Learning: For future scripts, reactive-firewall prefers to use only POSIX built-ins (like `printf` instead of `echo`) to align with CEP-8 conventions.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#0
File: :0-0
Timestamp: 2024-10-12T03:22:28.902Z
Learning: For future scripts, reactive-firewall prefers to keep the shebang line with an extra space (e.g., `#! /bin/bash`) as per project style.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#110
File: docs/CI.md:32-32
Timestamp: 2024-10-08T21:59:30.537Z
Learning: Reactive-firewall prefers to keep the word "own" in headings when emphasizing the reader's personal test.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#110
File: docs/CI.md:32-32
Timestamp: 2024-09-17T06:40:42.918Z
Learning: Reactive-firewall prefers to keep the word "own" in headings when emphasizing the reader's personal test.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#0
File: :0-0
Timestamp: 2024-10-08T03:15:05.171Z
Learning: For future reviews, remember that when drafting or updating CEP documents, it's important to adhere to the project's standard format and include all relevant sections such as Motivation, Detailed Explanation, Implementation Guidelines, Impact, and References.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#0
File: :0-0
Timestamp: 2024-10-08T21:59:30.537Z
Learning: For future reviews, remember that when drafting or updating CEP documents, it's important to adhere to the project's standard format and include all relevant sections such as Motivation, Detailed Explanation, Implementation Guidelines, Impact, and References.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#110
File: docs/USAGE.md:66-66
Timestamp: 2024-10-08T21:59:30.537Z
Learning: Reactive-firewall prefers to use "Caveat" as a heading instead of "Caution".

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#110
File: docs/USAGE.md:66-66
Timestamp: 2024-09-17T03:38:28.677Z
Learning: Reactive-firewall prefers to use "Caveat" as a heading instead of "Caution".

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#118
File: tests/check_pip:92-197
Timestamp: 2024-10-08T21:59:30.537Z
Learning: Reactive-firewall prefers defining functions before they are called in Bash scripts to avoid errors due to Bash's sequential interpretation.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#118
File: tests/check_pip:92-197
Timestamp: 2024-09-24T01:03:10.574Z
Learning: Reactive-firewall prefers defining functions before they are called in Bash scripts to avoid errors due to Bash's sequential interpretation.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#75
File: tests/test_deps.py:67-86
Timestamp: 2024-10-08T21:59:30.537Z
Learning: When testing the format of `tests/requirements.txt`, ensure that the regex pattern:
- Requires no whitespace directly before the comma.
- Excludes invalid operator combinations like `!!`, `!>`, `<!`, `><`, `>>`, `<<`, `<>`, `=>`, `=<`, `!`.
- Enforces one or more version specifiers to require pinned versions.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#75
File: tests/test_deps.py:67-86
Timestamp: 2024-10-08T21:59:27.171Z
Learning: When testing the format of `tests/requirements.txt`, ensure that the regex pattern:
- Requires no whitespace directly before the comma.
- Excludes invalid operator combinations like `!!`, `!>`, `<!`, `><`, `>>`, `<<`, `<>`, `=>`, `=<`, `!`.
- Enforces one or more version specifiers to require pinned versions.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#75
File: tests/test_deps.py:67-86
Timestamp: 2024-09-14T10:03:06.427Z
Learning: When testing the format of `tests/requirements.txt`, ensure that the regex pattern:
- Requires no whitespace directly before the comma.
- Excludes invalid operator combinations like `!!`, `!>`, `<!`, `><`, `>>`, `<<`, `<>`, `=>`, `=<`, `!`.
- Enforces one or more version specifiers to require pinned versions.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#0
File: :0-0
Timestamp: 2024-10-08T21:59:30.537Z
Learning: In the project's requirements files, requirement lines may include multiple version specifiers separated by commas (e.g., 'setuptools>=38.0, !=71.0.1, !=72.0'), and regular expressions used in tests should account for this format.

Learnt from: reactive-firewall
PR: reactive-firewall/multicast#0
File: :0-0
Timestamp: 2024-09-14T05:36:36.885Z
Learning: In the project's requirements files, requirement lines may include multiple version specifiers separated by commas (e.g., 'setuptools>=38.0, !=71.0.1, !=72.0'), and regular expressions used in tests should account for this format.

# multicast - MIT license
#-e git+https://github.com/reactive-firewall/multicast.git#egg=multicast
# wheel - MIT license
Expand Down
115 changes: 91 additions & 24 deletions tests/check_pip
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,23 @@ handle_signals

# lazy defined variables should be defined now that this is the only script instance.

# set the script-file to check_pip
SCRIPT_FILE="tests/check_pip"
# Set pip-audit options
AUDIT_OPTIONS="--progress-spinner off --desc on --requirement"
# List of Allowed Licenses delimited by semicolon ;
ALLOW_LICENSES="Public Domain;Apache Software License;MIT License;BSD License;Python Software Foundation License"
ALLOW_LICENSES="Public Domain;Apache Software License;MIT License;BSD License;Python Software Foundation License;The Unlicense (Unlicense);Mozilla Public License 2.0 (MPL 2.0);"
# Set pip-licenses options
LICENSE_OPTIONS="--from=mixed"

# Set pip options
PIP_COMMON_FLAGS="--require-virtualenv --use-pep517 --exists-action s --upgrade --upgrade-strategy only-if-needed --quiet"
# Set Env and OS specific pip options
if [[ $( \uname -s ) == "*arwin" ]] ; then
PIP_ENV_FLAGS="--break-system-packages"
LICENSE_OPTIONS="--python python3 ${LICENSE_OPTIONS} --ignore-packages certifi"
else
PIP_ENV_FLAGS=""
fi ;
# Enable auto-fix if '--fix' argument is provided
if [[ "$1" == "--fix" ]]; then
AUDIT_OPTIONS="--fix --strict ${AUDIT_OPTIONS}"
Expand All @@ -182,62 +192,118 @@ fi
# lazy defined functions should be defined now that this is the only script instance.

function report_summary() {
printf "::group::%s\n" "Results" ;
# Improved reporting based on EXIT_CODE
case "${EXIT_CODE}" in
0) printf "%s\n" "OK: Found no detected requirements errors." ;;
1) printf "%s\n" "FAIL: General failure during script execution." >&2 ;;
3) printf "%s\n" "FAIL: Gathering repostory's requirements failed." >&2 ;; # git ls-tree command failed
4) printf "%s\n" "FAIL: pip-audit detected security vulnerabilities." >&2 ;;
5) printf "%s\n" "FAIL: pip-licenses detected license issues." >&2 ;;
6) printf "%s\n" "FAIL: pip install failed." >&2 ;;
126) printf "%s\n" "SKIP: Unable to continue script execution." >&2 ;;
*) printf "%s\n" "FAIL: Detected requirements errors." >&2 ;;
0) printf "::notice title=OK::%s\n" "OK: Found no detected requirements errors." ;;
1) printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=CHECK-PIP::%s\n" "FAIL: General failure during script execution." >&2 ;;
3) printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=CONFIGURATION::%s\n" "FAIL: Gathering repostory's requirements failed." >&2 ;; # git ls-tree command failed
4) printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=SECURITY::%s\n" "FAIL: pip-audit detected security vulnerabilities." >&2 ;;
5) printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=LICENSE::%s\n" "FAIL: pip-licenses detected license issues." >&2 ;;
6) printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=INSTALL::%s\n" "FAIL: pip install failed." >&2 ;;
126) printf "::warning file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=SKIPPED::%s\n" "SKIP: Unable to continue script execution." >&2 ;;
*) printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=FAILED::%s\n" "FAIL: Detected requirements errors." >&2 ;;
esac
printf "::endgroup::\n" ;
}

function navigate_dirs_by_git() {
if _TEST_ROOT_DIR=$(git rev-parse --show-superproject-working-tree 2>/dev/null); then
if [ -z "${_TEST_ROOT_DIR}" ]; then
_TEST_ROOT_DIR=$(git rev-parse --show-toplevel 2>/dev/null)
fi
printf "::debug::%s\n" "Found ${_TEST_ROOT_DIR} ..." ;
else
printf "\t%s\n" "FAIL: missing valid repository or source structure" >&2
printf "::error file=file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=${FUNCNAME:-$0}::%s\n" "FAIL: missing valid repository or source structure" >&2
EXIT_CODE=40
fi
}

function check_license_when_given_req() {
local SUB_CODE=${EXIT_CODE-0}
umask 007
printf "::debug::%s\n" "need venv ..." ;
# Create a temporary directory for the virtual environment
temp_dir=$(mktemp -d)

# Enter the temporary directory
cd "$temp_dir"

# Create a virtual environment using venv
python3 -m venv venv

# Activate the virtual environment
source venv/bin/activate

umask 037
# 2>&1 >/dev/null
python3 -m pip install $PIP_COMMON_FLAGS $PIP_ENV_FLAGS "pip-licenses>=5.0" || SUB_CODE=6 ;
wait ;
printf "::debug::%s\n" "venv setup ... (${SUB_CODE})" ;
# Install the given Python modules using pip
for module in $@ ; do
printf "::debug::%s\n" "Checking license from package '$module' ..." ;
REQ_SPEC=$(grep -F "$module" <(cat <"${_TEST_ROOT_DIR}"/$req_file | sed -E -e '/^[[:space:]]*$/d' | sed -E -e '/^[#]+.*$/d') | grep -m1 -F "$module" )
ERR_MSG="pip install '$module' failed for $req_file." ;
if [[ ( $(python3 -m pip install $PIP_COMMON_FLAGS $PIP_ENV_FLAGS "${REQ_SPEC};" 2>/dev/null || false) ) ]] ;
then
printf "::debug::%s\n" "Fetched license from package '$module' ..." ;
[[ ("${SUB_CODE}" -eq 0) ]] && : ;
else
[[ ("${SUB_CODE}" -eq 0) ]] && SUB_CODE=6 && \
printf "::warning file=${req_file},line=1,col=1,title=PIP::%s\n" "${ERR_MSG}" >&2
fi
unset ERR_MSG 2>/dev/null || : ;
done

# Use pip-licenses to list the licenses of the installed packages
{ pip-licenses $LICENSE_OPTIONS --allow-only="${ALLOW_LICENSES}" || SUB_CODE=5 ;} ; wait ;

# Deactivate the virtual environment
deactivate

# return to starting dir
cd ${OLD_PWD} ;

# Remove the temporary directory and all of its contents
rm -rf "$temp_dir"
umask 137 ;
wait ;
return $SUB_CODE
}

# THIS IS THE ACTUAL TEST DIR USED (update _TEST_ROOT_DIR as needed)
_TEST_ROOT_DIR=$(git rev-parse --show-toplevel 2>/dev/null) ;
navigate_dirs_by_git

printf "::debug::%s\n" "Reading from repository ${_TEST_ROOT_DIR} ..." ;
# Get a list of files to check using git ls-tree with filtering (and careful shell globing)
FILES_TO_CHECK=$(git ls-tree -r --full-tree --name-only HEAD -- "${_TEST_ROOT_DIR}"/**/requirements.txt "${_TEST_ROOT_DIR}"/*-requirements.txt "${_TEST_ROOT_DIR}/requirements.txt" 2>/dev/null || EXIT_CODE=3)
FILES_TO_CHECK=$(git ls-tree -r --full-tree --name-only HEAD -- "${_TEST_ROOT_DIR}"/test/requirements.txt "${_TEST_ROOT_DIR}"/*-requirements.txt "${_TEST_ROOT_DIR}/requirements.txt" 2>/dev/null || EXIT_CODE=3)

# THIS IS THE ACTUAL TEST
printf "::debug::%s\n" "Starting checks ..." ;
# Iterate over files and run checks
for req_file in $FILES_TO_CHECK; do
printf "\t%s\n" "Checking ${req_file}" ;
printf "::group::%s\n" "Checking ${req_file}" ;
if [[ ( -x $(command -v pip-audit) ) ]] && [[ ("${EXIT_CODE}" -eq 0) ]] ; then
printf "\t\t%s\n" "Auditing ${req_file} for security vulnerabilities..."
printf "::debug::%s\n" "Auditing ${req_file} for security vulnerabilities ..."
{ pip-audit $AUDIT_OPTIONS "${req_file}" || EXIT_CODE=4 ;} ; wait ;
fi ;
if [[ ("${EXIT_CODE}" -eq 0) ]] ; then
printf "\t\t%s\n" "Checking licenses in $req_file..." ;
if [[ ( $(pip install -r "$req_file" --quiet 2>&1 >/dev/null || false) ) ]] ; then
{ pip-licenses $LICENSE_OPTIONS --allow-only="${ALLOW_LICENSES}" || EXIT_CODE=5 ;} ; wait ;
else
[[ ("${EXIT_CODE}" -eq 0) ]] && EXIT_CODE=6
printf "\t%s\n" "FAIL: pip install failed for $req_file." >&2
fi
printf "::debug::%s\n" "Checking licenses in $req_file ..." ;
# filter for only pkg from requirements file
PKG_TO_CHECK=$( { cat <"$req_file" | tr '><=' '=' | cut -d\= -f 1-1 | sed -E -e '/^[[:space:]]*$/d' | sed -E -e '/^[#]+.*$/d' | xargs -I{} grep -o -m1 -F "{}" "$req_file" | grep -ovE "^pip|setuptools|wheel|build|hypothesis|certifi$" | sort -u ; wait ;} 2>/dev/null );
check_license_when_given_req ${PKG_TO_CHECK} ; EXIT_CODE=$?
else
printf "\t%s\n" "FAIL: Found requirements errors." >&2 ;
printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-1},title=REQUIREMENTS::%s\n" "FAIL: Found requirements errors." >&2 ;
fi
printf "::endgroup::\n" ;
done

# summary reporting
printf "::debug::%s\n" "Summary reporting ..." ;
report_summary

# cleaning up
printf "::debug::%s\n" "Cleaning up ..." ;
cleanup || rm -f ${LOCK_FILE} 2>/dev/null || : ;

# unset when done
Expand All @@ -247,5 +313,6 @@ unset ALLOW_LICENSES 2>/dev/null || : ;
unset LICENSE_OPTIONS 2>/dev/null || : ;

wait ;
printf "::debug::%s\n" "Check-pip done." ;
# Exit with the appropriate code
exit ${EXIT_CODE:-255} ;
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ wheel>=0.44
# pip - MIT license
pip>=22.0
# build - MIT license
build>=1.2.1
build>=1.2.1, !=1.2.2.post1
4 changes: 3 additions & 1 deletion tests/test_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def test_requirements_format(self):
pattern = re.compile(
r'^\s*'
r'[a-zA-Z0-9_\-\.]+'
r'(?:,?\s?(?:==|!=|>=|<=|>|<)\s?[0-9\.]+)+'
r'(?:,?\s?(?:==|!=|>=|<=|>|<)\s?[0-9]+'
r'(?:\.[0-9]+)*(?:[a-zA-Z]+[0-9]*)?'
r'(?:\.[a-zA-Z]+[0-9]*)*)+'
r'(?:\s*(?:#.*)?)$'
)
with open('tests/requirements.txt', 'r') as req_file:
Expand Down
12 changes: 6 additions & 6 deletions tests/test_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_aborts_WHEN_calling_multicast_GIVEN_invalid_tools(self):
self.assertIsNone(test_fixture)
self.assertTupleEqual(
tst_dispatch.useTool(tst_in),
tuple((False, None)), # skipcq: PTC-W0020 - This is test-code.
(False, None), # skipcq: PTC-W0020 - This is test-code.
fail_fixture
)
theResult = True
Expand Down Expand Up @@ -246,7 +246,7 @@ def test_hear_is_stable_WHEN_calling_multicast_GIVEN_invalid_tool(self):
try:
self.assertTupleEqual(
multicast.__main__.main(["HEAR", "--hex"]),
tuple((0, (True, (False, None)))) # skipcq: PTC-W0020 - This is test-code.
(0, (True, (False, None))) # skipcq: PTC-W0020 - This is test-code.
)
theResult = True
except Exception as err:
Expand All @@ -261,10 +261,10 @@ def test_noop_stable_WHEN_calling_multicast_GIVEN_noop_args(self):
fail_fixture = str("""multicast.__main__.main(NOOP) == Error""")
try:
self.assertIsNotNone(multicast.__main__.main(["NOOP"]), fail_fixture)
self.assertIsNotNone(tuple(multicast.__main__.main(["NOOP"]))[0]) # skipcq: PTC-W0020
self.assertIsNotNone(multicast.__main__.main(["NOOP"])[0]) # skipcq: PTC-W0020
self.assertTupleEqual(
multicast.__main__.main(["NOOP"]),
tuple((0, tuple((True, None)))), # skipcq: PTC-W0020 - This is test-code.
(0, (True, None)), # skipcq: PTC-W0020 - This is test-code.
)
theResult = True
except Exception as err:
Expand All @@ -281,7 +281,7 @@ def test_help_works_WHEN_calling_multicast_GIVEN_help_tool(self):
self.assertIsNotNone(multicast.__main__.McastDispatch().doStep("HELP", []))
self.assertTupleEqual(
multicast.__main__.McastDispatch().doStep(["HELP"], []),
tuple((int(2), "NoOp")), # skipcq: PTC-W0020 - This is test-code.
(int(2), "NoOp"), # skipcq: PTC-W0020 - This is test-code.
)
theResult = True
except Exception as err:
Expand Down Expand Up @@ -399,7 +399,7 @@ def test_recv_Errors_WHEN_say_not_used(self):
test_cls = multicast.__main__.McastDispatch()
self.assertTupleEqual(
test_cls.doStep("NOOP", []),
tuple((int(2), "NoOp")), # skipcq: PTC-W0020 - This is test-code.
(int(2), "NoOp"), # skipcq: PTC-W0020 - This is test-code.
sub_fail_fixture
)
except Exception as _cause:
Expand Down
Loading