Skip to content

Instantly share code, notes, and snippets.

View nicoddemus's full-sized avatar

Bruno Oliveira nicoddemus

View GitHub Profile
@nicoddemus
nicoddemus / conftest.py
Created March 14, 2015 13:22
Expect conftest with small modification
# original from: http://pythontesting.net/framework/pytest/pytest-expect-plugin-1
import pytest
import inspect
import os.path
@pytest.fixture
def expect(request):
def do_expect(expr, msg=''):
if not expr:
_log_failure(request.node, msg)
@nicoddemus
nicoddemus / README.md
Last active April 15, 2022 19:23
Example on how to structure a package and testing modules

Arrange files like this:

apple/
  __init__.py
  apple.py
tests/
  test_everything.py
@nicoddemus
nicoddemus / runtests.py
Last active August 29, 2015 14:04
How to embed `pytest.main` into a frozen executable created by cx_freeze
import pytest, sys
sys.exit(pytest.main())
@nicoddemus
nicoddemus / oitavas.txt
Last active April 5, 2021 20:42
Soccer score generator
Seed: 173015
0 X 1
1 X 1
0 X 2
1 X 1
2 X 1
1 X 1
1 X 3
2 X 2