GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make test_ssti and test_xpath runnable standalone by MRX-72 · Pull Request #6136 · sqlmapproject/sqlmap

Conversation

@MRX-72

@MRX-72 MRX-72 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

tests/test_ssti.py and tests/test_xpath.py are the only two of the 107 tests/test_*.py files without an

if __name__ == "__main__":
    unittest.main(...)

block. Running either directly executes zero tests and prints nothing:

$ python3 tests/test_ssti.py
$            # no output, 0 tests run

They still run under CI's unittest discover, so this isn't a coverage gap in CI — but the per-file standalone workflow that the other 105 test files support is silently broken for these two.

Change

Add the standard entrypoint to both files (matching the verbosity=2 form used by the majority of the suite). No test logic is touched.

Verification

# before
$ python3 tests/test_ssti.py        # no output
$ python3 tests/test_xpath.py       # no output

# after
$ python3 tests/test_ssti.py
Ran 62 tests ... OK
$ python3 tests/test_xpath.py
Ran 48 tests ... OK (skipped=11)    # lxml-dependent tests skip cleanly

$ python3 -m unittest discover -s tests -p "test_*.py"   # unchanged

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@MRX-72
Make test_ssti and test_xpath runnable standalone
a98c245
Every tests/test_*.py file provides an

    if __name__ == "__main__":
        unittest.main(...)

entrypoint so it can be run directly, except test_ssti.py and
test_xpath.py. Running either of those directly produced no output and
executed none of its tests; they only ran under `unittest discover`.

Add the missing entrypoint to both so they behave like the rest of the
suite. No test logic changed (62 and 48 tests respectively still pass).
@stamparm
stamparm marked this pull request as ready for review October 5, 2026 21:54
@stamparm
stamparm merged commit 1b1f93a into sqlmapproject:master Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@MRX-72 @stamparm
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.