hitl_tester.modules.properties
Modifies the globals of a file based on properties passed in via the -D argument.
(c) 2020-2024 TurnAround Factor, Inc.
CUI DISTRIBUTION CONTROL Controlled by: DLA J68 R&D SBIP CUI Category: Small Business Research and Technology Distribution/Dissemination Controls: PROTECTED BY SBIR DATA RIGHTS POC: GOV SBIP Program Manager Denise Price, 571-767-0111 Distribution authorized to U.S. Government Agencies only, to protect information not owned by the U.S. Government and protected by a contractor’s ‘limited rights’ statement, or received with the understanding that it is not routinely transmitted outside the U.S. Government (determination made September 14, 2024). Other requests for this document shall be referred to ACOR DLA Logistics Operations (J-68), 8725 John J. Kingman Rd., Suite 4317, Fort Belvoir, VA 22060-6221
SBIR DATA RIGHTS Contract No.:SP4701-23-C-0083 Contractor Name: TurnAround Factor, Inc. Contractor Address: 10365 Wood Park Ct. Suite 313 / Ashland, VA 23005 Expiration of SBIR Data Rights Period: September 24, 2029 The Government's rights to use, modify, reproduce, release, perform, display, or disclose technical data or computer software marked with this legend are restricted during the period shown as provided in paragraph (b)(4) of the Rights in Noncommercial Technical Data and Computer Software--Small Business Innovative Research (SBIR) Program clause contained in the above identified contract. No restrictions apply after the expiration date shown above. Any reproduction of technical data, computer software, or portions thereof marked with this legend must also reproduce the markings.
The format is -D name or -D name=value where value is parsed with ast.literal_eval, or true if not provided.
For example:
-D MARKEDsets the globalMARKEDto true-D RATE=7sets the globalRATEto the integer 7-D FILE=config.cfgsets the globalFILEto the string "config.cfg"-D TITLE="Text with spaces"you can use quotes to pass strings with spaces
1""" 2Modifies the globals of a file based on properties passed in via the `-D` argument. 3 4(c) 2020-2024 TurnAround Factor, Inc. 5 6CUI DISTRIBUTION CONTROL 7Controlled by: DLA J68 R&D SBIP 8CUI Category: Small Business Research and Technology 9Distribution/Dissemination Controls: PROTECTED BY SBIR DATA RIGHTS 10POC: GOV SBIP Program Manager Denise Price, 571-767-0111 11Distribution authorized to U.S. Government Agencies only, to protect information not owned by the 12U.S. Government and protected by a contractor’s ‘limited rights’ statement, or received with the understanding that 13it is not routinely transmitted outside the U.S. Government (determination made September 14, 2024). Other requests 14for this document shall be referred to ACOR DLA Logistics Operations (J-68), 8725 John J. Kingman Rd., Suite 4317, 15Fort Belvoir, VA 22060-6221 16 17SBIR DATA RIGHTS 18Contract No.:SP4701-23-C-0083 19Contractor Name: TurnAround Factor, Inc. 20Contractor Address: 10365 Wood Park Ct. Suite 313 / Ashland, VA 23005 21Expiration of SBIR Data Rights Period: September 24, 2029 22The Government's rights to use, modify, reproduce, release, perform, display, or disclose technical data or computer 23software marked with this legend are restricted during the period shown as provided in paragraph (b)(4) of the Rights 24in Noncommercial Technical Data and Computer Software--Small Business Innovative Research (SBIR) Program clause 25contained in the above identified contract. No restrictions apply after the expiration date shown above. Any 26reproduction of technical data, computer software, or portions thereof marked with this legend must also reproduce 27the markings. 28 29The format is `-D name` or `-D name=value` where value is parsed with ast.literal_eval, or true if not provided. 30 31For example: 32- `-D MARKED` sets the global `MARKED` to true 33- `-D RATE=7` sets the global `RATE` to the integer 7 34- `-D FILE=config.cfg` sets the global `FILE` to the string "config.cfg" 35- `-D TITLE="Text with spaces"` you can use quotes to pass strings with spaces 36""" 37 38import inspect 39from types import FrameType 40 41import pytest 42 43 44def apply(): 45 """Modify globals of caller. Globals must occur before this is called.""" 46 assert isinstance(current_frame := inspect.currentframe(), FrameType) 47 assert isinstance(caller := current_frame.f_back, FrameType) 48 for global_var, value in pytest.flags.properties.items(): 49 caller.f_globals[global_var] = value
45def apply(): 46 """Modify globals of caller. Globals must occur before this is called.""" 47 assert isinstance(current_frame := inspect.currentframe(), FrameType) 48 assert isinstance(caller := current_frame.f_back, FrameType) 49 for global_var, value in pytest.flags.properties.items(): 50 caller.f_globals[global_var] = value
Modify globals of caller. Globals must occur before this is called.