Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(#18) Published the versionNumber function
Browse files Browse the repository at this point in the history
Published the `versionNumber` function as `lz4.version()` and added a
test case for checking if it's working.
  • Loading branch information
leandor committed Jul 1, 2017
1 parent 0fd43dd commit aba1b73
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/papi/lz4/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#include "module.h"

static test_initializer modules([](py::module &m) {
auto lz4 = m.def_submodule("lz4");

m.def_submodule("lz4")
.def("version", lz4::api::versionNumber);
});
5 changes: 3 additions & 2 deletions src/papi/lz4/module.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ifndef __CINT_LZ4_MODULE__
#define __CINT_LZ4_MODULE__

#pragma once


#include "api.h"

namespace lz4 {

class context {
Expand Down
10 changes: 10 additions & 0 deletions tests/papi/test_lz4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest

@pytest.fixture
def lz4():
from cint import lz4
return lz4


def testVersion(lz4):
assert lz4.version() == 10702

0 comments on commit aba1b73

Please sign in to comment.