Code Monkey home page Code Monkey logo

Comments (2)

masayukig avatar masayukig commented on June 26, 2024

Looking at the code, the tests fail when running stestr run passing after shutil.rmtree(stestr_repodir). I'm not sure why this failure happens only on python 3.12 yet..

https://github.com/mtreinish/stestr/blob/main/stestr/tests/test_return_codes.py#L229-L240

    def test_no_repo_dir(self):
        stestr_repo_dir = os.path.join(self.directory, ".stestr")
        shutil.rmtree(stestr_repo_dir, ignore_errors=True)
        # We can use stestr run even if there's no repo directory.
        self.assertRunExit("stestr run passing", 0)

    def test_empty_repo_dir(self):
        stestr_repo_dir = os.path.join(self.directory, ".stestr")
        shutil.rmtree(stestr_repo_dir, ignore_errors=True)
        os.mkdir(stestr_repo_dir)
        # We can initialize an empty repo directory.
        self.assertRunExit("stestr run passing", 0)

from stestr.

jelly avatar jelly commented on June 26, 2024

On Arch Linux with 3.12 we get:

stestr.tests.test_return_codes.TestReturnCodesToxIni.test_history_empty
-----------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/build/python-stestr/src/stestr-4.1.0/stestr/tests/test_return_codes.py", line 336, in test_history_empty
    self.assertEqual("", "\n".join([x.rstrip() for x in table.split("\n")]).strip())

      File "/usr/lib/python3.12/site-packages/testtools/testcase.py", line 395, in assertEqual
    self.assertThat(observed, matcher, message)

      File "/usr/lib/python3.12/site-packages/testtools/testcase.py", line 482, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: '' != '"Run ID","Passed","Runtime","Date"'


stestr.tests.test_return_codes.TestReturnCodesToxIni.test_history_list
----------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/build/python-stestr/src/stestr-4.1.0/stestr/tests/test_return_codes.py", line 321, in test_history_list
    self.assertIn("| 0      | True   |", table.split("\n")[3].rstrip())

      File "/usr/lib/python3.12/site-packages/testtools/testcase.py", line 401, in assertIn
    self.assertThat(haystack, Contains(needle), message)

      File "/usr/lib/python3.12/site-packages/testtools/testcase.py", line 482, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: '| 0      | True   |' not in '"2",True,"0.000670s","2024-04-09 18:35:50.974916+00:00"'

And:

stestr.tests.test_return_codes.TestReturnCodes.test_history_empty
-----------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/build/python-stestr/src/stestr-4.1.0/stestr/tests/test_return_codes.py", line 336, in test_history_empty
    self.assertEqual("", "\n".join([x.rstrip() for x in table.split("\n")]).strip())

      File "/usr/lib/python3.12/site-packages/testtools/testcase.py", line 395, in assertEqual
    self.assertThat(observed, matcher, message)

      File "/usr/lib/python3.12/site-packages/testtools/testcase.py", line 482, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: '' != '"Run ID","Passed","Runtime","Date"'

from stestr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.