This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'0': { | |
numFailedTestSuites: 0, | |
numFailedTests: 0, | |
numPassedTestSuites: 0, | |
numPassedTests: 0, | |
numPendingTestSuites: 0, | |
numPendingTests: 0, | |
numRuntimeErrorTestSuites: 0, | |
numTodoTests: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'0': { | |
context: { | |
config: { | |
automock: false, | |
browser: false, | |
cache: true, | |
cacheDirectory: '/private/var/folders/_x/_49pjjwx42b4t1j9v9vjv4yh0000gn/T/jest_dx', | |
clearMocks: false, | |
coveragePathIgnorePatterns: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'0': {}, | |
'1': { | |
numFailedTestSuites: 0, | |
numFailedTests: 0, | |
numPassedTestSuites: 15, | |
numPassedTests: 46, | |
numPendingTestSuites: 0, | |
numPendingTests: 0, | |
numRuntimeErrorTestSuites: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addons: | |
sonarcloud: | |
organization: $SONARQUBE_ORG_NAME | |
token: | |
secure: $SONARQUBE_TOKEN | |
services: | |
- docker | |
language: python | |
python: | |
- 3.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foo from 'module'; | |
const bar = (foo) => { | |
if (typeof (foo) === 'undefined') { | |
throw new Error('Foo needs to be defined stupid!'); | |
} | |
return new Foo(foo); | |
} | |
describe('bar', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
import subprocess | |
import os | |
import testinfra | |
DOCKER_IMAGE_NAME = 'gimpneek/snapdex' | |
# scope='session' uses the same container for all the tests; | |
# scope='function' uses a new container per test function. | |
@pytest.fixture(scope='class') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from unittest import TestCase | |
import pytest | |
@pytest.mark.usefixtures("host") | |
class TestRequirements(TestCase): | |
""" | |
Check the requirements for running the bot are set up in the Docker image | |
correctly | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist: xenial | |
services: | |
- docker | |
language: python | |
python: | |
- 3.7 | |
install: | |
- make install_bot_deps | |
script: | |
- make ci_test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyhue | |
HUE_IP = 'XXX.XXX.XXX.XXX' | |
HUE_USERNAME = 'replace_with_username' | |
HUE_ROOMS = ['Office'] | |
# Get the pyhue.Bridge instance | |
bridge = pyhue.Bridge(HUE_IP, HUE_USERNAME) | |
# Find the room in the list of rooms set up by the user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyhue | |
HUE_IP = 'XXX.XXX.XXX.XXX' | |
HUE_USERNAME = 'replace_with_username' | |
HUE_ROOMS = ['Office'] | |
# Get the pyhue.Bridge instance | |
bridge = pyhue.Bridge(HUE_IP, HUE_USERNAME) | |
# Find the room in the list of rooms set up by the user |