loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import unittest

class MutableArgs(unittest.TestCase):
  def test_sending_map_args(self):
    expected = {5: 1}
    self.assertEqual(expected, append_to({5: 1}))

  def test_sending_second_set_of_map_args(self):
    expected = {8: 3}
    self.assertEqual(expected, append_to({8: 3}))

  def test_sending_third_set_of_map_args(self):
    expected = {9: 1}
    self.assertEqual(expected, append_to({9: 1}))

  def test_sending_third_set_of_map_args(self):
    expected = {4: 0}
    self.assertEqual(expected, append_to({4: 0}))

  def test_foo_array(self):
    expected = ['baz']
    self.assertEqual(expected, foo_array())

  def test_foo_array_a_second_time(self):
    expected = ['baz']
    self.assertEqual(expected, foo_array())

  def test_foo_array_a_third_time(self):
    expected = ['baz']
    self.assertEqual(expected, foo_array())



def append_to(element, scores_map={}):
  scores_map.update(element)
  return scores_map

def foo_array(bar=[]):
  bar.append("baz")
  return bar

  

if __name__ == '__main__':
  unittest.main()