Skip to content

Instantly share code, notes, and snippets.

@larryng
larryng / allure-kotlin-android-11.md
Created May 6, 2021 15:10
allure-kotlin on Android 11

re: android/android-test#743 (comment)

The workaround is to write to the app external cache instead:

/**
 * Basically [AllureAndroidJUnitRunner] except:
 *  - [Allure.lifecycle] is set to [BniAllureLifecycle]
 *  - without [ExternalStoragePermissionsListener] which doesn't work on Android 11
 */
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 2 columns, instead of 3. in line 8.
61579, One Does Not Simply
61532, The Most Interesting Man In The World
101470, Ancient Aliens
8072285, Doge
438680, Batman Slapping Robin
405658, Grumpy Cat
61539, First World Problems
61585, Bad Luck Brian
347390, X, X Everywhere
61520, Futurama Fry
testtest
@larryng
larryng / modeltranslationfactory.py
Created April 5, 2012 18:19
Some Django glue to make factory-boy work with modeltranslation. Tested with python 2.7.2, django 1.3.1, factory-boy 1.1.3, and django-modeltranslation 0.3.3
import factory
import modeltranslation
class ModelTranslationFactory(factory.DjangoModelFactory):
"""Abstract Factory for models registered with modeltranslation.
Factories inheriting this produce objects with fields that adhere to the
'Rules for translated field access' specified by modeltranslation.
See: