mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
18 lines
416 B
Python
18 lines
416 B
Python
|
|
from typing import TYPE_CHECKING
|
||
|
|
|
||
|
|
import commands2
|
||
|
|
from util import * # type: ignore
|
||
|
|
|
||
|
|
if TYPE_CHECKING:
|
||
|
|
from .util import *
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
|
||
|
|
|
||
|
|
def test_printCommandSchedule(capsys, scheduler: commands2.CommandScheduler):
|
||
|
|
command = commands2.PrintCommand("Test!")
|
||
|
|
scheduler.schedule(command)
|
||
|
|
scheduler.run()
|
||
|
|
assert not scheduler.isScheduled(command)
|
||
|
|
assert capsys.readouterr().out == "Test!\n"
|