FEA-Bench / testbed /huggingface__datasets /tests /test_experimental.py
hc99's picture
Add files using upload-large-folder tool
2b06d1d verified
raw
history blame
416 Bytes
import unittest
import warnings
from datasets.utils import experimental
@experimental
def dummy_function():
return "success"
class TestExperimentalFlag(unittest.TestCase):
def test_experimental_warning(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
self.assertEqual(dummy_function(), "success")
self.assertEqual(len(w), 1)