-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run_cell() missing 1 required positional argument: 'raw_cell' #50
Comments
Thanks for the report. I'm afraid this is a known issue. It seems databricks modifies the base IPython shell. Unfortunately, I don't use databricks myself. So I can't debug this issue, but I'm happy to accept PRs on this topic. |
Not sure this is still relevant: but simply using |
Added additional debugging info to the magic function. As there is no way for me to fix this issue and there is a work around available, I will close this ticket once the changes of #59 are released. |
Hi,
I installed ipytest, and ran the following in one cell
import ipytest
ipytest.autoconfig()
which was successful. But the first of the following lines gave me an error:
%%run_pytest[clean] -qq
def test_example():
assert [1, 2, 3] == [1, 2, 3]
I also tried
%%run_pytest[clean]
The error I get is this:
run_cell() missing 1 required positional argument: 'raw_cell'
with the following detail:
TypeError Traceback (most recent call last)
in
----> 1 get_ipython().run_cell_magic('run_pytest[clean]', '-qq', '\ndef test_example():\n assert [1, 2, 3] == [1, 2, 3]\n')
/databricks/python/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2360 with self.builtin_trap:
2361 args = (magic_arg_s, cell)
-> 2362 result = fn(*args, **kwargs)
2363 return result
2364
</databricks/python/lib/python3.7/site-packages/decorator.py:decorator-gen-123> in run_pytest_clean(self, line, cell)
/databricks/python/lib/python3.7/site-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/databricks/python/lib/python3.7/site-packages/ipytest/_pytest_support.py in run_pytest_clean(self, line, cell)
258
259 clean_tests(items=main.dict)
--> 260 return self.run_pytest(line, cell)
261
262 @cell_magic
</databricks/python/lib/python3.7/site-packages/decorator.py:decorator-gen-124> in run_pytest(self, line, cell)
/databricks/python/lib/python3.7/site-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/databricks/python/lib/python3.7/site-packages/ipytest/_pytest_support.py in run_pytest(self, line, cell)
268
269 else:
--> 270 self.shell.run_cell(cell)
271
272 import ipytest
TypeError: run_cell() missing 1 required positional argument: 'raw_cell'
The text was updated successfully, but these errors were encountered: