From b301d979151db1c6a726877e667bfcc74ac45730 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Sat, 3 Mar 2018 16:48:53 +0000 Subject: [PATCH] Add broken tests for #65 --- .../__snapshots__/jsfmt.spec.js.snap | 71 +++++++++++++++++++ tests/python_raise/jsfmt.spec.js | 2 + tests/python_raise/raise.py | 16 +++++ 3 files changed, 89 insertions(+) create mode 100644 tests/python_raise/__snapshots__/jsfmt.spec.js.snap create mode 100644 tests/python_raise/jsfmt.spec.js create mode 100644 tests/python_raise/raise.py diff --git a/tests/python_raise/__snapshots__/jsfmt.spec.js.snap b/tests/python_raise/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 0000000..abe9177 --- /dev/null +++ b/tests/python_raise/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,71 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`raise.py 1`] = ` +raise +raise ValueError +raise ValueError("error") + +raise NotImplementedError( + 'The SimpleListFilter.lookups() method must be overridden to ' + 'return a list of tuples (value, verbose value).' +) + +raise forms.ValidationError( + self.error_messages['invalid_login'], + code='invalid_login', + params={ + 'username': self.username_field.verbose_name + } +) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +raise +raise ValueError +raise ValueError("error") + +raise NotImplementedError( + 'The SimpleListFilter.lookups() method must be overridden to ' + 'return a list of tuples (value, verbose value).' +) + +raise forms.ValidationError( + self.error_messages["invalid_login"], + code="invalid_login", + params={"username": self.username_field.verbose_name} +) + +`; + +exports[`raise.py 2`] = ` +raise +raise ValueError +raise ValueError("error") + +raise NotImplementedError( + 'The SimpleListFilter.lookups() method must be overridden to ' + 'return a list of tuples (value, verbose value).' +) + +raise forms.ValidationError( + self.error_messages['invalid_login'], + code='invalid_login', + params={ + 'username': self.username_field.verbose_name + } +) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +raise +raise ValueError +raise ValueError("error") + +raise NotImplementedError( + 'The SimpleListFilter.lookups() method must be overridden to ' + 'return a list of tuples (value, verbose value).' +) + +raise forms.ValidationError( + self.error_messages["invalid_login"], + code="invalid_login", + params={"username": self.username_field.verbose_name} +) + +`; diff --git a/tests/python_raise/jsfmt.spec.js b/tests/python_raise/jsfmt.spec.js new file mode 100644 index 0000000..dc63c4d --- /dev/null +++ b/tests/python_raise/jsfmt.spec.js @@ -0,0 +1,2 @@ +run_spec(__dirname, ["python"], { pythonVersion: "2" }); +run_spec(__dirname, ["python"], { pythonVersion: "3" }); diff --git a/tests/python_raise/raise.py b/tests/python_raise/raise.py new file mode 100644 index 0000000..6f5145a --- /dev/null +++ b/tests/python_raise/raise.py @@ -0,0 +1,16 @@ +raise +raise ValueError +raise ValueError("error") + +raise NotImplementedError( + 'The SimpleListFilter.lookups() method must be overridden to ' + 'return a list of tuples (value, verbose value).' +) + +raise forms.ValidationError( + self.error_messages['invalid_login'], + code='invalid_login', + params={ + 'username': self.username_field.verbose_name + } +)