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

Random timing related test failure on windows #4519

Open
jenshnielsen opened this issue Aug 17, 2022 · 1 comment
Open

Random timing related test failure on windows #4519

jenshnielsen opened this issue Aug 17, 2022 · 1 comment

Comments

@jenshnielsen
Copy link
Collaborator

Observed in CI on windows 10

______________________________ test_adjust_timer ______________________________
[gw0] win32 -- Python 3.10.6 C:\hostedtoolcache\windows\Python\3.10.6\x64\python.exe

tektronix_dpo = <TektronixDPO7000xx: dpo>

    def test_adjust_timer(tektronix_dpo):
        """
        After adjusting the type of the measurement or the source of the
        measurement, we need wait at least 0.1 seconds
        ('minimum_adjustment_time') before a measurement value can be
        retrieved. Test this.
        """
    
        timer = timeit.Timer(
            'tektronix_dpo.measurement[0].source1("CH1"),'
            'tektronix_dpo.measurement[0].amplitude()',
            globals=locals(),
        )
        min_time = tektronix_dpo.measurement[0]._minimum_adjustment_time
        repeats = timer.repeat(repeat=10, number=1)
    
        # The minimum time should be at least 95% of the 'minimum_adjustment_time'
>       assert all(t > min_time * 0.95 for t in repeats)
E       assert False
E        +  where False = all(<generator object test_adjust_timer.<locals>.<genexpr> at 0x00000221557F5CB0>)
@jenshnielsen
Copy link
Collaborator Author

Xfailed this test on windows in #4530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant