File: test_import.py

package info (click to toggle)
python-line-profiler 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,256 kB
  • sloc: python: 8,119; sh: 810; ansic: 297; makefile: 14
file content (15 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def test_import():
    import line_profiler
    assert hasattr(line_profiler, 'LineProfiler')
    assert hasattr(line_profiler, '__version__')


def test_version():
    import line_profiler
    from packaging.version import Version
    import kernprof
    line_profiler_version1 = Version(line_profiler.__version__)
    line_profiler_version2 = Version(line_profiler.line_profiler.__version__)
    kernprof_version = Version(kernprof.__version__)
    assert line_profiler_version1 == line_profiler_version2 == kernprof_version, (
        'All 3 places should have the same version')