Skip to content

Commit

Permalink
Adds flushes to pydyad test printing
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumsden committed Jul 27, 2023
1 parent 02e9890 commit ef60cd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/pydyad_spsc/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def consume_data(i, num_ints_expected):
)
if not np.array_equal(int_buf, verify_int_buf):
raise RuntimeError("Consumed data is incorrect!")
print("Correctly consumed data (iter {})".format(i))
print("Correctly consumed data (iter {})".format(i), flush=True)


def main():
Expand All @@ -45,7 +45,7 @@ def main():
global CONS_DIR
CONS_DIR = args.cons_managed_dir.expanduser().resolve()
for i in range(args.num_files):
print("Trying to consume data (iter {})".format(i))
print("Trying to consume data (iter {})".format(i), flush=True)
consume_data(i, args.num_ints_expected)


Expand Down
4 changes: 2 additions & 2 deletions tests/pydyad_spsc/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def produce_data(i, num_ints):
int_buf = np.arange(start_val, start_val+num_ints, dtype=np.uint64)
with dyad_open(fname, "wb") as f:
np.save(f, int_buf)
print("Successfully produced data (iter {})".format(i))
print("Successfully produced data (iter {})".format(i), flush=True)


def main():
Expand All @@ -32,7 +32,7 @@ def main():
global PROD_DIR
PROD_DIR = args.prod_managed_dir.expanduser().resolve()
for i in range(args.num_files):
print("Trying to produce data (iter {})".format(i))
print("Trying to produce data (iter {})".format(i), flush=True)
produce_data(i, args.num_ints)


Expand Down

0 comments on commit ef60cd8

Please sign in to comment.