Skip to content
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

Add many_calls tests to EXECUTING_SLOW_TESTS #78

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

matoro
Copy link
Contributor

@matoro matoro commented Nov 5, 2023

Still fails on slow CPU.

=================================================== FAILURES ====================================================
_________________________________ TestStuff.test_many_source_for_filename_calls _________________________________

self = <tests.test_main.TestStuff testMethod=test_many_source_for_filename_calls>

    def test_many_source_for_filename_calls(self):
        source = None
        start = time.time()
        for i in range(5000):
            new_source = Source.for_filename(__file__)
            if source is None:
                source = new_source
                self.assertGreater(len(source.lines), 700)
                self.assertGreater(len(source.text), 7000)
            else:
                self.assertIs(source, new_source)
>       self.assertLess(time.time() - start, 1)
E       AssertionError: 1.5195212364196777 not less than 1

i          = 4999
new_source = <executing.executing.Source object at 0x200028dc390>
self       = <tests.test_main.TestStuff testMethod=test_many_source_for_filename_calls>
source     = <executing.executing.Source object at 0x200028dc390>
start      = 1699163050.1516447

tests/test_main.py:304: AssertionError

@alexmojaki
Copy link
Owner

I think it'd be better to skip this test unless EXECUTING_SLOW_TESTS is on.

@matoro matoro changed the title Relax many_calls tests further Add many_calls tests to EXECUTING_SLOW_TESTS Nov 6, 2023
@matoro
Copy link
Contributor Author

matoro commented Nov 6, 2023

I think it'd be better to skip this test unless EXECUTING_SLOW_TESTS is on.

Switched to this and retitled PR.

@alexmojaki
Copy link
Owner

great, thanks!

@alexmojaki alexmojaki merged commit 6a54f98 into alexmojaki:master Nov 6, 2023
10 checks passed
matoro added a commit to matoro/gentoo that referenced this pull request Nov 6, 2023
The original skips are technically for tests that take a long time to
run, which these aren't really - they just fail if run under a
sufficiently slow CPU since they are measuring a hard real-time
benchmark.  Already accepted upstream.

See: alexmojaki/executing#78
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
matoro added a commit to matoro/gentoo that referenced this pull request Nov 7, 2023
The original skips are technically for tests that take a long time to
run, which these aren't really - they just fail if run under a
sufficiently slow CPU since they are measuring a hard real-time
benchmark.  Already accepted upstream.

See: alexmojaki/executing#78
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
matoro added a commit to matoro/gentoo that referenced this pull request Nov 7, 2023
The original skips are technically for tests that take a long time to
run, which these aren't really - they just fail if run under a
sufficiently slow CPU since they are measuring a hard real-time
benchmark.  Already accepted upstream.

See: alexmojaki/executing#78
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
matoro added a commit to matoro/gentoo that referenced this pull request Nov 7, 2023
The original skips are technically for tests that take a long time to
run, which these aren't really - they just fail if run under a
sufficiently slow CPU since they are measuring a hard real-time
benchmark.  Already accepted upstream.

See: alexmojaki/executing#78
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Nov 7, 2023
The original skips are technically for tests that take a long time to
run, which these aren't really - they just fail if run under a
sufficiently slow CPU since they are measuring a hard real-time
benchmark.  Already accepted upstream.

See: alexmojaki/executing#78
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Signed-off-by: Sam James <sam@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants