Skip to content

Commit 23874f6

Browse files
committed
test: Change --config-file to config
This patch changes the --config-file option to --config to avoid conflict with pytest >= 7.4.0 Fix oracle#565
1 parent 31f38df commit 23874f6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README-development.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ By default, the tests will look for a config file, 'config' in 'tests/resources'
4949
If 'tests/resources' does not exist, the tests will try attempt to use
5050
'tests/configuration/config'.
5151
The default profile is ``DEFAULT``. You can change this with the
52-
``--config-file`` and ``--config-profile`` options.
52+
``--config`` and ``--config-profile`` options.
5353

5454
.. code-block:: sh
5555
5656
# Use a different config file, still using the DEFAULT profile
57-
tox -- --config-file ~/.oci/config
57+
tox -- --config ~/.oci/config
5858
5959
# Using a different profile in the default config file
6060
tox -- --config-profile IAD_PROFILE
@@ -103,4 +103,4 @@ The SDK is packaged as a wheel. In order to generate the wheel you can run:
103103
104104
python setup.py sdist bdist_wheel
105105
106-
This wheel can then be installed via `pip`.
106+
This wheel can then be installed via `pip`.

tests/configuration/config.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; Copy this file to file named `config` and fill in the values to run tests
22
; which require cloud resources. You can also run the tests using a different
3-
; configuration by passing the path to pytest with ``--config-file``.
4-
; For more information on using ``--config-file`` see README-developement.rst
3+
; configuration by passing the path to pytest with ``--config``.
4+
; For more information on using ``--config`` see README-developement.rst
55
; For more information on how to configure the SDK see
66
; https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm
77

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def pytest_addoption(parser):
16-
parser.addoption("--config-file", action="store", help="location of the config file",
16+
parser.addoption("--config", action="store", help="location of the config file",
1717
default=get_resource_path('config'))
1818
parser.addoption("--config-profile", action="store",
1919
help="profile to use from the config file",
@@ -30,7 +30,7 @@ def pytest_configure(config):
3030

3131
@pytest.fixture(scope="session")
3232
def config_file(request):
33-
return request.config.getoption("--config-file")
33+
return request.config.getoption("--config")
3434

3535

3636
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)