Skip to content

Commit

Permalink
test: update python resourcegraph test
Browse files Browse the repository at this point in the history
Problem: the python JGF writer no longer outputs certain vertex
metadata, but the tests expect it to be there.

Change the tests to no longer look for the eliminated metadata.
  • Loading branch information
jameshcorbett committed Sep 18, 2024
1 parent 42140d7 commit 1a640ad
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions t/python/t10001-resourcegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ class TestResourceGraph(unittest.TestCase):
"""Test for the ResourceGraph class."""

def _check_metadata(self, metadata):
if metadata["type"] in ("node", "core", "gpu", "cluster"):
self.assertEqual(metadata["unit"], "")
self.assertEqual(metadata["size"], 1)
self.assertEqual(metadata["properties"], {})
else:
if metadata["type"] not in ("node", "core", "gpu", "cluster"):
raise ValueError(metadata["type"])

def test_basic(self):
Expand Down Expand Up @@ -94,10 +90,8 @@ def test_basic_3(self):
if metadata["type"] != "node":
self._check_metadata(node.get_metadata())
else:
self.assertEqual(metadata["unit"], "")
self.assertEqual(metadata["size"], 1)
self.assertEqual(len(metadata["properties"]), 1)
if metadata["id"] < 10:
if int(metadata["name"][len("compute"):]) < 10:
self.assertEqual(metadata["properties"]["pdebug"], "")
else:
self.assertEqual(metadata["properties"]["pbatch"], "")
Expand Down

0 comments on commit 1a640ad

Please sign in to comment.