Skip to content

Commit

Permalink
fix test_assert_verbosity_overrides test in ci because pytest behav…
Browse files Browse the repository at this point in the history
…es differently in the ci (EPIC!!!!!!!)
  • Loading branch information
DetachHead committed Jul 2, 2024
1 parent eed3c21 commit 8586c4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/fixtures/test_python/test_assert_verbosity_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def test_default(big_value: list[int]):
assert big_value == []


def test_verbose(big_value: list[int]):
assert big_value == [], AssertOptions(verbosity=2)
def test_less_verbose(big_value: list[int]):
assert big_value == [], AssertOptions(verbosity=0)


def test_set_back_to_default(big_value: list[int]):
Expand Down
8 changes: 4 additions & 4 deletions tests/test_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,10 @@ def test_maxfail(pr: PytestRobotTester):


def test_assert_verbosity_overrides(pr: PytestRobotTester):
pr.run_and_assert_result("-o", "enable_assertion_pass_hook=true", failed=3)
pr.run_and_assert_result("-vv", "-o", "enable_assertion_pass_hook=true", failed=3)
xml = output_xml()
assert xml.xpath("//test[@name='test_default']//msg[contains(., 'Use -v to get more diff')]")
assert xml.xpath("//test[@name='test_verbose']//msg[contains(., 'Full diff:')]")
assert xml.xpath("//test[@name='test_default']//msg[contains(., 'Full diff:')]")
assert xml.xpath(

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f0d65ba33c0>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f0d65ba33c0>> = <tests.conftest._XmlElement object at 0x7f0d65cd54c0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f0d65b97040>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f0d65b97040>> = <tests.conftest._XmlElement object at 0x7f0d65ccc910>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f61fc114d80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f61fc114d80>> = <tests.conftest._XmlElement object at 0x7f61fc11a550>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f61fc567b40>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f61fc567b40>> = <tests.conftest._XmlElement object at 0x7f61f7f55fa0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7fdc088a6f80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7fdc088a6f80>> = <tests.conftest._XmlElement object at 0x7fdc08ce95e0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7fdc0885da80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7fdc0885da80>> = <tests.conftest._XmlElement object at 0x7fdc08ceae70>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f24298f23c0>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f24298f23c0>> = <tests.conftest._XmlElement object at 0x7f2429c82030>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f242ac4d780>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f242ac4d780>> = <tests.conftest._XmlElement object at 0x7f2429c830b0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f3c24912a80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f3c24912a80>> = <tests.conftest._XmlElement object at 0x7f3c24bf65a0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f3c24809b00>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f3c24809b00>> = <tests.conftest._XmlElement object at 0x7f3c24bf89b0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f60d1a8ed80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f60d1a8ed80>> = <tests.conftest._XmlElement object at 0x7f60d1bd2990>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, ubuntu-latest, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f60d16b5000>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f60d16b5000>> = <tests.conftest._XmlElement object at 0x7f60d1bd38c0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10c3faf80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10c3faf80>> = <tests.conftest._XmlElement object at 0x10c115430>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10c155980>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10c155980>> = <tests.conftest._XmlElement object at 0x10c114e00>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10ccbeb40>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10ccbeb40>> = <tests.conftest._XmlElement object at 0x10c76f650>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10cc68680>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10cc68680>> = <tests.conftest._XmlElement object at 0x10c76fcb0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10e308540>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10e308540>> = <tests.conftest._XmlElement object at 0x10e372db0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10e7c3480>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10e7c3480>> = <tests.conftest._XmlElement object at 0x10e36e240>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f9ea7ea5280>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f9ea7ea5280>> = <tests.conftest._XmlElement object at 0x7f9ea7a9a280>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7f9ea7a34ec0>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7f9ea7a34ec0>> = <tests.conftest._XmlElement object at 0x7f9ea7e99640>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x11220f7c0>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x11220f7c0>> = <tests.conftest._XmlElement object at 0x111f2c4a0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.12, macos-12, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x11220ea80>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x11220ea80>> = <tests.conftest._XmlElement object at 0x111f2c710>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10f16a980>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10f16a980>> = <tests.conftest._XmlElement object at 0x10f1480a0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, 6.1.1, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x10f484c00>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x10f484c00>> = <tests.conftest._XmlElement object at 0x10f148430>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x105b3a1c0>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x105b3a1c0>> = <tests.conftest._XmlElement object at 0x105b4bb80>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x105b37840>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x105b37840>> = <tests.conftest._XmlElement object at 0x105b4b7c0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x1101aacc0>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x1101aacc0>> = <tests.conftest._XmlElement object at 0x1101d36d0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, from lockfile, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x1101f7600>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x1101f7600>> = <tests.conftest._XmlElement object at 0x1101ef5e0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7fcf6ed01400>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7fcf6ed01400>> = <tests.conftest._XmlElement object at 0x7fcf6ef831f0>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, ubuntu-latest, 6.1.1, from lockfile)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x7fcf6ed01100>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x7fcf6ed01100>> = <tests.conftest._XmlElement object at 0x7fcf6ef71f70>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_on] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x108e9ea40>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x108e9ea40>> = <tests.conftest._XmlElement object at 0x108e90130>.xpath

Check failure on line 968 in tests/test_python.py

View workflow job for this annotation

GitHub Actions / test (3.8, macos-12, from lockfile, 8.0)

test_assert_verbosity_overrides[xdist_off] assert [] + where [] = <bound method _Element.xpath of <Element robot at 0x107fb3e40>>("//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]") + where <bound method _Element.xpath of <Element robot at 0x107fb3e40>> = <tests.conftest._XmlElement object at 0x108e907f0>.xpath
"//test[@name='test_set_back_to_default']//msg[contains(., 'Use -v to get more diff')]"
"//test[@name='test_less_verbose']//msg[contains(., 'Use -v to get more diff')]"
)
assert xml.xpath("//test[@name='test_set_back_to_default']//msg[contains(., 'Full diff:')]")

0 comments on commit 8586c4d

Please sign in to comment.