pytest: strict config (#29676)

* pytest: strict config

* collection works

* fixes
This commit is contained in:
Adeeb Shihadeh
2023-08-28 10:26:19 -07:00
committed by GitHub
parent c36774dfba
commit 72e2e2c9ec
4 changed files with 48 additions and 30 deletions

View File

@@ -18,19 +18,18 @@ class TestPlotJuggler(unittest.TestCase):
install()
pj = os.path.join(PJ_DIR, "juggle.py")
p = subprocess.Popen(f'QT_QPA_PLATFORM=offscreen {pj} --demo None 1 --qlog',
stderr=subprocess.PIPE, shell=True, start_new_session=True)
with subprocess.Popen(f'QT_QPA_PLATFORM=offscreen {pj} --demo None 1 --qlog',
stderr=subprocess.PIPE, shell=True, start_new_session=True) as p:
# Wait for "Done reading Rlog data" signal from the plugin
output = "\n"
with Timeout(180, error_msg=output):
while output.splitlines()[-1] != "Done reading Rlog data":
output += p.stderr.readline().decode("utf-8")
# Wait for "Done reading Rlog data" signal from the plugin
output = "\n"
with Timeout(180, error_msg=output):
while output.splitlines()[-1] != "Done reading Rlog data":
output += p.stderr.readline().decode("utf-8")
# ensure plotjuggler didn't crash after exiting the plugin
time.sleep(15)
self.assertEqual(p.poll(), None)
os.killpg(os.getpgid(p.pid), signal.SIGTERM)
# ensure plotjuggler didn't crash after exiting the plugin
time.sleep(15)
self.assertEqual(p.poll(), None)
os.killpg(os.getpgid(p.pid), signal.SIGTERM)
# TODO: also test that layouts successfully load
def test_layouts(self):