Skip to content

Commit 9dbad2c

Browse files
authored
Merge pull request #1739 from dbcli/RW/gather-pytest-files
Gather pytest files in a subdirectory
2 parents 25e5e19 + eb4526c commit 9dbad2c

19 files changed

+10
-50
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Internal
1717
* Collect CLI arguments into a dataclass.
1818
* Clean up generated files after test runs.
1919
* Migrate toplevel tool configurations to `pyproject.toml`.
20+
* Gather `pytest` files into a subdirectory, separated from `behave` tests.
2021

2122

2223
1.66.0 (2026/03/21)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
from test.utils import TEMPFILE_PREFIX
2222

23-
LOGIN_PATH_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "mylogin.cnf"))
23+
LOGIN_PATH_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "../mylogin.cnf"))
2424

2525

2626
def open_bmylogin_cnf(name):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from mycli.packages.completion_engine import suggest_type
66
from mycli.packages.special.dbcommands import list_tables
77
from mycli.packages.special.utils import format_uptime
8-
from test.test_completion_engine import sorted_dicts
8+
from test.pytests.test_completion_engine import sorted_dicts
99

1010

1111
def test_list_tables_verbose_preserves_field_results():
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
from mycli.sqlexecute import ServerInfo, SQLExecute
2929
from test.utils import DATABASE, HOST, PASSWORD, PORT, TEMPFILE_PREFIX, USER, dbtest, run
3030

31-
test_dir = os.path.abspath(os.path.dirname(__file__))
32-
project_dir = os.path.dirname(test_dir)
33-
default_config_file = os.path.join(project_dir, "test", "myclirc")
34-
login_path_file = os.path.join(test_dir, "mylogin.cnf")
31+
pytests_dir = os.path.abspath(os.path.dirname(__file__))
32+
project_root_dir = os.path.abspath(os.path.join(pytests_dir, '..', '..'))
33+
default_config_file = os.path.join(project_root_dir, 'test', 'myclirc')
34+
login_path_file = os.path.join(project_root_dir, 'test', 'mylogin.cnf')
3535

3636
os.environ["MYSQL_TEST_LOGIN_FILE"] = login_path_file
3737
CLI_ARGS = [

0 commit comments

Comments
 (0)