Skip to content

Commit bad07db

Browse files
committed
refactor: updated test and documentation acc to reviews
Signed-off-by: rohansen856 <rohansen856@gmail.com>
1 parent 6acd640 commit bad07db

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ To test your new contribution, add [unit tests](https://github.com/openml/openml
9898
9999
#### Running Tests That Require Admin Privileges
100100
101-
Some tests require admin privileges on the test server and will be automatically skipped unless you provide an admin API key. For regular contributors, the tests will skip gracefully. For core contributors who need to run these tests locally:
102-
103-
**Set up the key** by exporting the variable:
104-
run this in the terminal before running the tests:
101+
Some tests require admin privileges on the test server and will be automatically skipped unless you provide an admin API key. For regular contributors, the tests will skip gracefully. For core contributors who need to run these tests locally, you can set up the key by exporting the variable as below before running the tests:
105102
106103
```bash
107104
# For windows

tests/test_openml/test_config.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,11 @@ def test_setup_with_config(self):
106106

107107

108108
class TestConfigurationForExamples(openml.testing.TestBase):
109-
@pytest.mark.skipif(
110-
not os.environ.get(openml.config.OPENML_TEST_SERVER_ADMIN_KEY_ENV_VAR),
111-
reason="Test requires admin key. Set OPENML_TEST_SERVER_ADMIN_KEY environment variable.",
112-
)
113109
@pytest.mark.production()
114110
def test_switch_to_example_configuration(self):
115111
"""Verifies the test configuration is loaded properly."""
116112
# Below is the default test key which would be used anyway, but just for clarity:
117-
openml.config.apikey = TestBase.admin_key
113+
openml.config.apikey = "any-api-key"
118114
openml.config.server = self.production_server
119115

120116
openml.config.start_using_configuration_for_example()

0 commit comments

Comments
 (0)