mumuki-python-runner 1.10.2 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfe4c1b7c4a05396eff95054475016150f8625f9986a7470e7ae3616c2ac74ea
4
- data.tar.gz: c2c69063f8ce3905dcca15c0b8c9bbcefcb6ebc28be1d92fb4780f29b97f3b25
3
+ metadata.gz: cefaefb1ab84a0218be06bbd134d1543158f3ca2d6fd133899cf95ee7e3cc822
4
+ data.tar.gz: 2971e74902753121aed0b2e30234586dd2e8bd13b6359fd4213ad80ddcf7bbe6
5
5
  SHA512:
6
- metadata.gz: 3661eefa8f35a6992f4632893ef87d04f888c0f56076b73a4a7793d329f37e4a5dda9e09526e14ae1f33e940d8b628966d0da5f2d840163bf9d84600e30a1e43
7
- data.tar.gz: 0b248d700f5a711514f76a34310ef9b2598e6d04d68bffe7cb54d6f59a9404d93949785d3cf4826c0d44f1461b43bca4e9ab08271dd41cfc7642ef686890dc75
6
+ metadata.gz: bca878d84b9575df7af3e969dbaaefcca8e3f69341bced7db8191b9c3ca44062a263c57eadc2c015c1a2ecf2c759ebeb312184d8ac577a9bf037e29a89da03ee
7
+ data.tar.gz: cf7ab7483bc64df071e2c0cedf858ccdcad8b74fa178c276cdf3ded1638168fe46c76d2383723f2e838df812e5ee529877c8a4a99f26e175d694f09fc6f2f106
@@ -57,16 +57,22 @@ python
57
57
  failure = test_case.xpath('failure', 'error')
58
58
  error = failure.attribute('type')
59
59
  message = failure.attribute('message')
60
+ assertion_error_message = try_extract_assertion_error(failure)
60
61
 
61
62
  [
62
63
  format_test_name(test_case.attribute('name').to_s),
63
64
  error.nil? ? :passed: :failed,
64
- error.nil? ? '' : "#{error}: #{message}"
65
+ error.nil? ? '' : "#{error}: #{assertion_error_message || message}"
65
66
  ]
66
67
  end
67
68
 
69
+ def try_extract_assertion_error(failure)
70
+ failure.text.split("AssertionError: ")[1]&.rstrip.try do |it|
71
+ it.each_line.count > 1 ? it + "\n" : it
72
+ end
73
+ end
74
+
68
75
  def format_test_name(name)
69
76
  name.sub('test_', '').gsub('_', ' ').capitalize
70
77
  end
71
78
  end
72
-
data/lib/base/version.rb CHANGED
@@ -1,4 +1,4 @@
1
-
2
- module BasePythonVersionHook
3
- VERSION = '1.10.2'
4
- end
1
+
2
+ module BasePythonVersionHook
3
+ VERSION = '1.11.0'
4
+ end
@@ -7,7 +7,7 @@ In order to solve exercises like this, you will need to create an account and lo
7
7
  First, create a cell with the following code:
8
8
 
9
9
  ```python
10
- !pip install mumuki-xce
10
+ !pip install mumuki-xce --quiet
11
11
 
12
12
  from mumuki import IMumuki
13
13
  mumuki = IMumuki("#...token...#", "#...locale...#")
@@ -7,7 +7,7 @@ Para poder resolver ejercicios como éste, necesitarás ingresar a [`Colab`](htt
7
7
  Primero, creá una celda con el siguiente código:
8
8
 
9
9
  ```python
10
- !pip install mumuki-xce
10
+ !pip install mumuki-xce --quiet
11
11
 
12
12
  from mumuki import IMumuki
13
13
  mumuki = IMumuki("#...token...#", "#...locale...#")
@@ -7,7 +7,7 @@ Para resolver exercícios como este, você precisará fazer login no [`Colab`](h
7
7
  Primeiro, crie uma célula com o seguinte código:
8
8
 
9
9
  ```python
10
- !pip install mumuki-xce
10
+ !pip install mumuki-xce --quiet
11
11
 
12
12
  from mumuki import IMumuki
13
13
  mumuki = IMumuki("#...token...#", "#. . .locale...#")
@@ -3,7 +3,7 @@
3
3
  You will need to use `python` and `pip` in order to solve exercises like this. Please ensure you have those commands locally installed in your computer. Then install `mumuki-xce`:
4
4
 
5
5
  ```shell
6
- pip install mumuki-xce
6
+ pip install mumuki-xce --quiet
7
7
  ```
8
8
 
9
9
  Now you are ready to solve exercises!
@@ -3,7 +3,7 @@
3
3
  Para poder resolver ejercicios como éste, necesitarás utilizar los comandos `python` y `pip`. Antes de comenzar, asegurate de tenerlos instalados. Después, ejecutá el siguiente comando, por única vez (si ya lo hiciste anteriormente, podés saltar al siguente paso):
4
4
 
5
5
  ```shell
6
- pip install mumuki-xce
6
+ pip install mumuki-xce --quiet
7
7
  ```
8
8
 
9
9
  ¡Ya podés empezar a resolver ejercicios!
@@ -3,7 +3,7 @@
3
3
  Para resolver exercícios como este, você precisará usar os comandos `python` e `pip`. Antes de começar, certifique-se de tê-los instalados. Então, execute o seguinte comando, apenas uma vez (se você já fez isso antes, você pode pular para o próximo passo):
4
4
 
5
5
  ```shell
6
- pip install mumuki-xce
6
+ pip install mumuki-xce --quiet
7
7
  ```
8
8
 
9
9
  Agora você pode começar a resolver os exercícios!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-python-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-22 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit