language stringclasses 4
values | source_code stringlengths 2 986k | test_code stringlengths 125 758k | repo_name stringclasses 97
values | instruction stringlengths 156 643 |
|---|---|---|---|---|
python | # Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'TimeSource' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: TimeSource
- Dependencies to Mock: TYPE_CHECKING, weakref, SetParametersResult, ROSClock, ClockType
Requirements: Use @patch for mocks, follow AAA pattern. |
python | # Copyright 2024-2025 Brad Martin
# Copyright 2024 Merlin Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # Copyright 2024-2025 Brad Martin
# Copyright 2024 Merlin Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'TargetModule' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: TargetModule
- Dependencies to Mock: faulthandler, typing, rclpy.executors, _rclpy
Requirements: Use @patch for mocks, follow AAA pattern. |
python | # Copyright 2016 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2020 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'Subscription' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: Subscription
- Dependencies to Mock: Enum, inspect, TracebackType, Callable, Generic
Requirements: Use @patch for mocks, follow AAA pattern. |
python | # Copyright 2023 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2023 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'TypeDescriptionService' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: TypeDescriptionService
- Dependencies to Mock: TYPE_CHECKING, weakref, ParameterDescriptor, ParameterType, _rclpy
Requirements: Use @patch for mocks, follow AAA pa... |
python | # Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2022 Sony Group Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'ParameterService' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: ParameterService
- Dependencies to Mock: TYPE_CHECKING, weakref, ListParametersResult, SetParametersResult, GetParameterTypes
Requirements: Use @patch for mocks, follow ... |
python | # Copyright 2020 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2020 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'QoSOverridingOptions' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: QoSOverridingOptions
- Dependencies to Mock: Any, Callable, Iterable, List, Optional
Requirements: Use @patch for mocks, follow AAA pattern. |
python | # Copyright 2017 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2017 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'TargetModule' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: TargetModule
- Dependencies to Mock: _rclpy
Requirements: Use @patch for mocks, follow AAA pattern. |
python | # Copyright 2020 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # Copyright 2020 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | rclpy | You are an expert Python testing engineer.
Task: Write a unit test for 'TargetModule' using 'unittest' and 'unittest.mock'.
Context:
- Class Name: TargetModule
- Dependencies to Mock: Type, _rclpy, MsgT
Requirements: Use @patch for mocks, follow AAA pattern. |
python | "# Copyright 2017 Open Source Robotics Foundation, Inc.\n#\n# Licensed under the Apache License, Ver(...TRUNCATED) | "# Copyright 2017 Open Source Robotics Foundation, Inc.\n#\n# Licensed under the Apache License, Ver(...TRUNCATED) | rclpy | "You are an expert Python testing engineer.\nTask: Write a unit test for 'MultiThreadedExecutor' usi(...TRUNCATED) |
python | "# Copyright 2017 Open Source Robotics Foundation, Inc.\n#\n# Licensed under the Apache License, Ver(...TRUNCATED) | "# Copyright 2017 Open Source Robotics Foundation, Inc.\n#\n# Licensed under the Apache License, Ver(...TRUNCATED) | rclpy | "You are an expert Python testing engineer.\nTask: Write a unit test for 'TargetModule' using 'unitt(...TRUNCATED) |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 5