Skip to content

Instantly share code, notes, and snippets.

pick a46239c GH-123 Added paragraph to testing documentation roughly explaining new testing method with the python setup.py test script and parameter.
pick 1247ddb Update link to project proposal
pick 4674136 GH-467 Addressed feedback from dideler: condensed original 3 examples into one unittest discover example and reworded new example using PyTest.
pick 89fa9b4 gh-#467 removed references to unittest. Fixed spelling of pytest in example.
pick 566d335 gh-#467 added the first section of the QA part, back to the testing page.
pick 906857b GH-123 Added paragraph to testing documentation roughly explaining new testing method with the python setup.py test script and parameter.
pick aad229c GH-467 Addressed feedback from dideler: condensed original 3 examples into one unittest discover example and reworded new example using PyTest.
pick fc2d837 gh-#467 removed references to unittest. Fixed spelling of pytest in example.
pick e9d8470 gh-#467 added the first section of the QA part, back to the testing page.
pick 9522
@SRomansky
SRomansky / gist:91d4c274d904e9c9ed0e
Created September 11, 2014 14:58
Rebase mess, after creating new temp cherry-picked branch and reseting to it.
pick 9e2914a GH-123 Added paragraph to testing documentation roughly explaining new testing method with the python setup.py test script and parameter.
pick c5a7bab GH-467 Addressed feedback from dideler: condensed original 3 examples into one unittest discover example and reworded new example using PyTest.
pick 3f74114 gh-#467 removed references to unittest. Fixed spelling of pytest in example.
pick 4f92a70 gh-#467 added the first section of the QA part, back to the testing page.
pick aafa04a Updated markdown used in refering to directories.
pick b784dec Update link to project proposal
pick 38e4263 Added naming to popup dialogs in ConfigTool
pick dfae468 Close #435 Create HTTP API for controlling Freeseer recording
# Rebase 04b5896..dfae468 onto 04b5896
@SRomansky
SRomansky / gist:797c338b00a32cb20f28
Created September 21, 2014 15:49
freeseer/docs/source/conf.py change
sys.path.append("../../src") # Temporarily add freeseer/src to $PATH. # line 19
os.environ["PYTHONPATH"]="$PYTHONPATH:" + os.path.join(os.getcwd(), "/../../")
print sys.path
print os.environ["PYTHONPATH"]
# run `make clean; make html` from freeseer/docs
@SRomansky
SRomansky / gist:341ebb33baaa57ee4a57
Created September 27, 2014 06:25
test_database.py with pytest decorator and fixture.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# freeseer - vga/presentation capture software
#
# Copyright (C) 2013 Free and Open Source Software Learning Centre
# http://fosslc.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@SRomansky
SRomansky / gist:0178611f4a31d2326847
Created September 27, 2014 07:14
framework/test_presentation.py version 2 with out odd decorator.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# freeseer - vga/presentation capture software
#
# Copyright (C) 2013 Free and Open Source Software Learning Centre
# http://fosslc.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@SRomansky
SRomansky / gist:c186fe2a5f4b644a44e6
Created October 1, 2014 03:12
py.test errors 2014-09-30
==================================== ERRORS ====================================
______ ERROR collecting freeseer/tests/frontend/controller/test_server.py ______
freeseer/tests/frontend/controller/test_server.py:35: in <module>
from freeseer.frontend.controller import server
freeseer/frontend/controller/server.py:31: in <module>
from flask import current_app
E ImportError: No module named flask
_____ ERROR collecting freeseer/tests/frontend/controller/test_validate.py _____
freeseer/tests/frontend/controller/test_validate.py:27: in <module>
from freeseer.frontend.controller import validate
tmpdir = local('/tmp/pytest-6/test_query_result_types0')
@pytest.fixture
def db(tmpdir):
profile_path = tmpdir.mkdtemp()
profile = Profile(profile_path, 'testing')
> return profile.get_database()
freeseer/tests/framework/test_db_pytest.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
^ higher priority
_ lower priority
N not testing
Y yes test this
??? Where is the test that tests this file?
Name Stmts Miss Cover Ts?
-------------------------------------------------------------------------------
freeseer/__init__ 33 33 0% N
freeseer/__main__ 2 2 0% N
freeseer/framework/config/__init__ 1 1 0% N
^ higher priority
_ lower priority
N not testing
Y yes test this
? Could test this, undecided based on time or importance
??? Where is the test that tests this file?
Name Stmts Miss Cover Ts?
-------------------------------------------------------------------------------
freeseer/__init__ 33 33 0% N
freeseer/__main__ 2 2 0% N
@SRomansky
SRomansky / gist:7f7e7a937dd9618fb3c7
Created October 25, 2014 05:38
misunderstanding of mvc
def test_psyduck(db, presentation):
presentations_model_before = db.get_presentations_model()
assert presentations_model_before.rowCount() == 0
db.insert_presentation(presentation)
presentations_model_after = db.get_presentations_model()
assert presentations_model_after.rowCount() == 1 # Explosions, failures, such disappoint.