Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc75bbf1

Browse files
committed
make FileFormat.locate look in the correct dir
1 parent513f8c2 commitc75bbf1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎Orange/widgets/data/tests/test_owfile.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def test_select_reader(self):
470470

471471
deftest_auto_detect_and_override(self):
472472
tab_as_xlsx=FileFormat.locate("actually-a-tab-file.xlsx",
473-
path.split(__file__)[0])
473+
[dirname(__file__)])
474474
iris=FileFormat.locate("iris",dataset_dirs)
475475

476476
reader_combo=self.widget.reader_combo
@@ -536,7 +536,7 @@ def open_file(_a, _b, _c, filters, _e):
536536

537537
# Now load a real Excel file: this is a known excention so the combo
538538
# should return to auto-detect
539-
filename=FileFormat.locate("an_excel_file.xlsx",dataset_dirs)
539+
filename=FileFormat.locate("an_excel_file.xlsx",[dirname(__file__)])
540540
self.widget.browse_file()
541541
self.assertEqual(self.widget.reader_combo.currentText(),
542542
"Determine type from the file extension")
@@ -551,7 +551,7 @@ def open_file(_a, _b, _c, filters, _e):
551551
assertself.get_output(self.widget.Outputs.data)isnotNone
552552

553553
# Files with unknown extensions require manual selection
554-
filename=FileFormat.locate("an_excel_file.foo",dataset_dirs)
554+
filename=FileFormat.locate("an_excel_file.foo",[dirname(__file__)])
555555
self.widget.browse_file()
556556
self.assertTrue(self.widget.Error.select_file_type.is_shown())
557557
self.assertIsNone(self.get_output(self.widget.Outputs.data))
@@ -562,7 +562,7 @@ def open_file(_a, _b, _c, filters, _e):
562562
self.assertIsNotNone(self.get_output(self.widget.Outputs.data))
563563

564564
# Consecutive loading of files with the same extension keeps selection
565-
filename=FileFormat.locate("an_excel_file-too.foo",dataset_dirs)
565+
filename=FileFormat.locate("an_excel_file-too.foo",[dirname(__file__)])
566566
self.widget.browse_file()
567567
self.assertFalse(self.widget.Error.unknown_select.is_shown())
568568
self.assertFalse(self.widget.Error.select_file_type.is_shown())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp