mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-31 14:11:50 +08:00
Move DD code into its own directory (#6)
This commit is contained in:
15
reference/tests/commands/ddtrace_run_sitecustomize.py
Normal file
15
reference/tests/commands/ddtrace_run_sitecustomize.py
Normal file
@ -0,0 +1,15 @@
|
||||
import sys
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# detect if `-S` is used
|
||||
suppress = len(sys.argv) == 2 and sys.argv[1] == '-S'
|
||||
if suppress:
|
||||
assert 'sitecustomize' not in sys.modules
|
||||
else:
|
||||
assert 'sitecustomize' in sys.modules
|
||||
|
||||
# ensure the right `sitecustomize` will be imported
|
||||
import sitecustomize
|
||||
assert sitecustomize.CORRECT_IMPORT
|
||||
print('Test success')
|
Reference in New Issue
Block a user