Skip to content

test_monitoring has duplicated tests #106193

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

Closed
sobolevn opened this issue Jun 28, 2023 · 3 comments · Fixed by #109139
Closed

test_monitoring has duplicated tests #106193

sobolevn opened this issue Jun 28, 2023 · 3 comments · Fixed by #109139
Assignees
Labels
3.12 only security fixes 3.13 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Jun 28, 2023

Based on python/core-workflow#505 by @hugovk

Lib/test/test_monitoring.py:973:5: F811 redefinition of unused 'test_line_then_instruction' from line 950
Lib/test/test_monitoring.py:978:5: F811 redefinition of unused 'test_instruction_then_line' from line 955

Before rename: Ran 49 tests in 0.014s
After rename:

======================================================================
ERROR: test_instruction_then_line (test.test_monitoring.TestInstallIncrementallly.test_instruction_then_line)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_monitoring.py", line 956, in test_instruction_then_line
    recorders = [ InstructionRecorder, LineRecorderLowNoise ]
                                       ^^^^^^^^^^^^^^^^^^^^
NameError: name 'LineRecorderLowNoise' is not defined

======================================================================
ERROR: test_line_then_instruction (test.test_monitoring.TestInstallIncrementallly.test_line_then_instruction)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_monitoring.py", line 953, in test_line_then_instruction
    recorders = recorders, must_include = self.EXPECTED_LI)
                                          ^^^^^^^^^^^^^^^^
AttributeError: 'TestInstallIncrementallly' object has no attribute 'EXPECTED_LI'

----------------------------------------------------------------------
Ran 51 tests in 0.045s

FAILED (errors=2)
test test_monitoring failed
test_monitoring failed (2 errors)

== Tests result: FAILURE ==

1 test failed:
    test_monitoring

Total duration: 94 ms
Tests result: FAILURE

Based on the missing runtime parts in these tests, we can just remove the first two ones, I guess.

Both of these tests were introduced in 411b169 by @markshannon

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Jun 28, 2023
@sobolevn sobolevn self-assigned this Jun 28, 2023
@sobolevn
Copy link
Member Author

No, they cannot be just deleted, because they test different things.

@sobolevn
Copy link
Member Author

Introduced in b32a075#diff-15fb0cb29709c04c449bacd69e4ab2208372424d8390c26258eb83b2363c3cf1

Looks like it never had parts that are missing right now.

@hugovk hugovk added 3.12 only security fixes 3.13 bugs and security fixes labels Sep 8, 2023
@hugovk
Copy link
Member

hugovk commented Sep 8, 2023

Please see PR #109139.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 only security fixes 3.13 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants