Skip to content
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

Lint tests #220

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
def test_import():
import line_profiler
import line_profiler
assert hasattr(line_profiler, 'LineProfiler')
assert hasattr(line_profiler, '__version__')


def test_version():
import line_profiler
from packaging.version import Version
assert Version(line_profiler.__version__)
2 changes: 1 addition & 1 deletion tests/test_ipython.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import unittest
import io

from IPython.testing.globalipapp import get_ipython


class TestIPython(unittest.TestCase):
def test_init(self):
ip = get_ipython()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_line_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def g(x):
y = yield x + 10
yield y + 20


class C:
@classmethod
def c(self, value):
Expand Down Expand Up @@ -93,6 +94,7 @@ def test_gen_decorator():
next(i)
assert profile.enable_count == 0


def test_classmethod_decorator():
profile = LineProfiler()
c_wrapped = profile(C.c)
Expand Down