@@ -0,0 +1,1686 @@
+import openliveq as olq%0Afrom openliveq.question_features import (answer_num, log_answer_num,%0A    view_num, log_view_num, is_open, is_vote, is_solved, rank, updated_at)%0Aimport pytest%0Aimport os%0Afrom math import log%0A%0Aclass TestQuestionFeatures(object):%0A%0A    def test_answer_num(self, q1, q2):%0A        assert answer_num(q1) == 1%0A        assert answer_num(q2) == 2%0A%0A    def test_view_num(self, q1, q2):%0A        assert view_num(q1) == 952%0A        assert view_num(q2) == 14593%0A%0A    def test_is_open(self, q1, q2):%0A        assert is_open(q1) == 0%0A        assert is_open(q2) == 0%0A%0A    def test_is_vote(self, q1, q2):%0A        assert is_vote(q1) == 0%0A        assert is_vote(q2) == 0%0A%0A    def test_is_solved(self, q1, q2):%0A        assert is_solved(q1) == 1%0A        assert is_solved(q2) == 1%0A%0A    def test_rank(self, q1, q2, q3):%0A        assert rank(q1) == 1%0A        assert rank(q2) == 1%0A        assert rank(q3) == 2%0A%0A    def test_updated_at(self, q1, q2, q3):%0A        assert updated_at(q1) %3E updated_at(q2)%0A        assert updated_at(q2) %3E updated_at(q3)%0A%0A    @pytest.fixture%0A    def fe(self):%0A        return olq.FeatureExtractor()%0A%0A    @pytest.fixture%0A    def question_filepath(self):%0A        return os.path.join(os.path.dirname(__file__),%0A            %22fixtures%22, %22sample_questions.tsv%22)%0A%0A    @pytest.fixture%0A    def questions(self, fe, question_filepath):%0A        with open(question_filepath) as f:%0A            result = olq.Question.load(f)%0A        return result%0A%0A    @pytest.fixture%0A    def q1(self, questions):%0A        return questions%5B0%5D%0A%0A    @pytest.fixture%0A    def q2(self, questions):%0A        return questions%5B1%5D%0A%0A    @pytest.fixture%0A    def q3(self, questions):%0A        return questions%5B2%5D%0A

Add tests for question_features