This file contains 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
$ tox | |
... | |
... # content snipped | |
... | |
# The test passes for the 1st parameterized run when ordinary_object='quill' | |
(Pdb) ordinary_object |
This file contains 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 mock | |
import pytest | |
@pytest.mark.parametrize( | |
'ordinary_object', | |
[ | |
'quill', | |
'cushion', |
This file contains 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 mock | |
import pytest | |
@pytest.mark.parametrize( | |
'ordinary_object', | |
[ | |
'quill', | |
'cushion', |
This file contains 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 functools import lru_cache | |
from spells import cast_spell | |
@lru_cache(maxsize=2) | |
def levitate(target): | |
""" | |
Levitates `target` with the "Wingardium Leviosa" spell. | |
:param str target: Object that you would like to levitate |
This file contains 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
# -*- coding: utf-8 -*- | |
import argparse | |
import logging | |
import sys | |
def main(argv=None): | |
argparser = argparse.ArgumentParser( | |
description='A boilerplate greeting program!', | |
) |
This file contains 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
// @flow | |
/** | |
* Libdefs for Node’s experimental (as of v10.7.x) core module, perf_hooks. | |
* | |
* TODO Work in progress. Add libdefs for other functions in this module. | |
* | |
* @see https://nodejs.org/api/perf_hooks.html | |
*/ | |
declare module 'perf_hooks' { |
This file contains 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 { shallow } from 'enzyme'; | |
import ExampleComponent from './ExampleComponent'; | |
describe('ExampleComponent', () => { | |
it('fetches data from server when server returns a successful response', done => { // 1 | |
const mockSuccessResponse = {}; | |
const mockJsonPromise = Promise.resolve(mockSuccessResponse); // 2 | |
const mockFetchPromise = Promise.resolve({ // 3 | |
json: () => mockJsonPromise, |
This file contains 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 React, { Component } from 'react'; | |
class ExampleComponent extends Component { | |
componentDidMount() { | |
const fetchedData = this.fetchDataFromServer(); | |
// ... do something with fetchedData e.g. set the data | |
} | |
async fetchDataFromServer() { |
This file contains 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
gcc | |
libQt5Svg5 | |
libqt5-qtsvg-devel | |
libqt5-qtx11extras-devel | |
libX11-devel | |
libQt5Widgets-devel | |
libQt5PlatformHeaders-devel |
This file contains 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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
/* Alias */ | |
$config__tile: ( | |
"active": ( | |
"background-color": #4C9CEA, |
NewerOlder