Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Nov 20, 2024
1 parent fdcbd60 commit f67cd55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ def on_new_line(self, line, is_full_line):
raise exc
super(Wait4promptUnicodeError, self).on_new_line(line, is_full_line)

timeout = 0.3
output = "bash\n"
dict_output = {'line': u'abcbash', 'matched': u'bash', 'named_groups': {}, 'groups': (), 'time': 0}
event = Wait4promptUnicodeError(connection=buffer_connection.moler_connection, prompt="bash", till_occurs_times=1)
event._ignore_unicode_errors = False
event.raise_unicode = True
event.start(timeout=0.1)
event.start(timeout=timeout)
buffer_connection.moler_connection.data_received("abc".encode("utf-8"), datetime.datetime.now())
MolerTest.sleep(0.01)
event.raise_unicode = False
Expand All @@ -164,7 +165,7 @@ def on_new_line(self, line, is_full_line):
event = Wait4promptUnicodeError(connection=buffer_connection.moler_connection, prompt="bash", till_occurs_times=1)
event._ignore_unicode_errors = True
event.raise_unicode = True
event.start(timeout=0.1)
event.start(timeout=timeout)
buffer_connection.moler_connection.data_received("abc".encode("utf-8"), datetime.datetime.now())
MolerTest.sleep(0.01)
event.raise_unicode = False
Expand Down
2 changes: 1 addition & 1 deletion test/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_2_jobs_concurrently():
job1.cancel()
job2.cancel()
assert (2 == values_2['number'])
assert (4 == values_1['number'])
assert (4 == values_1['number'] or 5 == values_1['number'])


def test_thread_test_job():
Expand Down

0 comments on commit f67cd55

Please sign in to comment.