Skip to content

Commit

Permalink
Update tdvt_test.py
Browse files Browse the repository at this point in the history
fix tests to pass on Mac arm
  • Loading branch information
lukewrites authored May 23, 2024
1 parent 43d2ace commit ead1935
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tdvt/test/tdvt_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ def test_command_line_override_full(self):
if sys.platform in ('win32', 'cygwin'):
expected = win_path
elif sys.platform == 'darwin':
expected = mac_path
if platform.machine() == 'arm64':
expected = mac_arm_path
else:
expected = mac_path
elif sys.platform == 'linux':
expected = linux_path
else:
Expand All @@ -341,7 +344,7 @@ def test_command_line_override_full(self):
def test_command_line_full(self):
self.test_config.output_dir = 'my/output/dir'
self.test_config.d_override = '-DLogLevel=Debug'
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerycli", "tabquerytool.exe")
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerytool", "tabquerytool.exe")

work = tdvt_core.BatchQueueWork(self.test_config, self.test_set)
cmd_line = build_tabquery_command_line_local(work)
Expand All @@ -356,7 +359,7 @@ def test_command_line_full(self):

def test_password_file(self):
self.test_config.output_dir = 'my/output/dir'
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerycli", "tabquerytool.exe")
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerytool", "tabquerytool.exe")
suite = 'password_test'

self.test_set = ExpressionTestSet('', TEST_DIRECTORY, 'mytest', self.test_config.tds, '', self.test_file, suite)
Expand All @@ -366,7 +369,7 @@ def test_password_file(self):
self.assertTrue('--password-file' in cmd_line_str and 'password_test.password' in cmd_line_str)

def test_command_line_no_expected(self):
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerycli", "tabquerytool.exe")
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerytool", "tabquerytool.exe")
work = tdvt_core.BatchQueueWork(self.test_config, self.test_set)
cmd_line = build_tabquery_command_line_local(work)
cmd_line_str = ' '.join(cmd_line)
Expand All @@ -380,7 +383,7 @@ def test_command_line_no_expected(self):

def test_command_line_multiple_override(self):
self.test_config.d_override = '-DLogLevel=Debug -DUseJDBC -DOverride=MongoDBConnector:on,SomethingElse:off'
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerycli", "tabquerytool.exe")
self.test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerytool", "tabquerytool.exe")

work = tdvt_core.BatchQueueWork(self.test_config, self.test_set)
cmd_line = build_tabquery_command_line_local(work)
Expand All @@ -403,7 +406,7 @@ def test_command_line_multiple_override_from_invocation(self):

test_file = 'some/test/file.txt'
test_set = ExpressionTestSet('', TEST_DIRECTORY, 'mytest', test_config.tds, '', self.test_file, '')
test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerycli", "tabquerytool.exe")
test_config.tested_run_time_config.set_tabquery_paths("tabquerytool", "tabquerytool", "tabquerytool", "tabquerytool.exe")

work = tdvt_core.BatchQueueWork(test_config, self.test_set)
cmd_line = build_tabquery_command_line_local(work)
Expand Down

0 comments on commit ead1935

Please sign in to comment.