def test_maxfilter(): """Test mne maxfilter.""" check_usage(mne_maxfilter) with ArgvSetter(('-i', raw_fname, '--st', '--movecomp', '--linefreq', '60', '--trans', raw_fname)) as out: with pytest.warns(RuntimeWarning, match="Don't use"): os.environ['_MNE_MAXFILTER_TEST'] = 'true' try: mne_maxfilter.run() finally: del os.environ['_MNE_MAXFILTER_TEST'] for check in ('maxfilter', '-trans', '-movecomp'): assert check in out.stdout.getvalue(), check
def test_maxfilter(): """Test mne maxfilter""" check_usage(mne_maxfilter) with ArgvSetter(("-i", raw_fname, "--st", "--movecomp", "--linefreq", "60", "--trans", raw_fname)) as out: with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") os.environ["_MNE_MAXFILTER_TEST"] = "true" try: mne_maxfilter.run() finally: del os.environ["_MNE_MAXFILTER_TEST"] assert_true(len(w) == 1) for check in ("maxfilter", "-trans", "-movecomp"): assert_true(check in out.stdout.getvalue(), check)
def test_maxfilter(): """Test mne maxfilter.""" check_usage(mne_maxfilter) with ArgvSetter(('-i', raw_fname, '--st', '--movecomp', '--linefreq', '60', '--trans', raw_fname)) as out: with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always') os.environ['_MNE_MAXFILTER_TEST'] = 'true' try: mne_maxfilter.run() finally: del os.environ['_MNE_MAXFILTER_TEST'] assert_true(len(w) == 1) for check in ('maxfilter', '-trans', '-movecomp'): assert_true(check in out.stdout.getvalue(), check)
def test_maxfilter(): """Test mne maxfilter""" check_usage(mne_maxfilter) with ArgvSetter(('-i', raw_fname, '--st', '--movecomp', '--linefreq', '60', '--trans', raw_fname)) as out: with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always') os.environ['_MNE_MAXFILTER_TEST'] = 'true' try: mne_maxfilter.run() finally: del os.environ['_MNE_MAXFILTER_TEST'] assert_true(len(w) == 1) for check in ('maxfilter', '-trans', '-movecomp'): assert_true(check in out.stdout.getvalue(), check)