Skip to content

FAILED tests/main_test.py::TestPositionalArgumentFeature::test_positional_arg_invalid_commit - assert 0 == 1 #372

@shenxianpeng

Description

@shenxianpeng
Run CodSpeedHQ/action@9a74b6ba663684052277e8f342b5eb99c7442a03
Run RUNNER_VERSION=""
Run actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
Cache not found for input keys: codspeed-instruments-simulation-Linux-X64-6.14.0-1017-azure-4.10.5, codspeed-instruments-simulation-Linux-X64-6.14.0-1017-azure-
Run # Validate required inputs

   ______            __ _____                         __
  / ____/____   ____/ // ___/ ____   ___   ___   ____/ /
 / /    / __ \ / __  / \__ \ / __ \ / _ \ / _ \ / __  /
/ /___ / /_/ // /_/ / ___/ // /_/ //  __//  __// /_/ /
\____/ \____/ \__,_/ /____// .___/ \___/ \___/ \__,_/
  https://codspeed.io/     /_/          runner v4.10.5

Installing packages: /tmp/valgrind-codspeed.deb
Installation completed successfully
Running the benchmarks
  ============================= test session starts ==============================
  platform linux -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
  codspeed: 4.3.0 (enabled, mode: simulation, callgraph: enabled)
  rootdir: /home/runner/work/commit-check/commit-check
  configfile: pyproject.toml
  plugins: mock-3.15.1, codspeed-4.3.0
  collected 237 items / 67 deselected / 170 selected
  
  tests/config_test.py ..................                                  [ 10%]
  tests/engine_test.py ................................................... [ 40%]
  .................                                                        [ 50%]
  tests/main_test.py ......................................F.              [ 74%]
  tests/rule_builder_test.py .............                                 [ 81%]
  tests/util_test.py ...............................                       [100%]
  =============================== 170 benchmarked ================================
  
  =================================== FAILURES ===================================
  _______ TestPositionalArgumentFeature.test_positional_arg_invalid_commit _______
  
  self = <main_test.TestPositionalArgumentFeature object at 0x7196bf0>
  
      @pytest.mark.benchmark
      def test_positional_arg_invalid_commit(self):
          """Test that positional argument correctly rejects invalid commits."""
          with tempfile.NamedTemporaryFile(mode="w", delete=False) as f:
              f.write("invalid commit message without type")
              f.flush()
      
              try:
                  # Use positional argument with invalid message
                  sys.argv = ["commit-check", f.name]
                  result = main()
  >               assert result == 1  # Should fail validation
                  ^^^^^^^^^^^^^^^^^^
  E               assert 0 == 1
  
  tests/main_test.py:547: AssertionError
  =========================== short test summary info ============================
  FAILED tests/main_test.py::TestPositionalArgumentFeature::test_positional_arg_invalid_commit - assert 0 == 1
  =========== 1 failed, 169 passed, 67 deselected in 295.40s (0:04:55) ===========
  Error: Error: failed to execute the benchmark process, exit code: 1
  Error: Process completed with exit code 1.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions